WebSite X5Help Center

 
Andre V.
Andre V.
User

Looking to add javascript calculations from the inputs of contact form fields  en

Autor: Andre V.
Besucht 2103, Followers 2, Geteilt 0  

So I have a website that makes takes reservations for a vacation club I am part of. I have created a reservation page with the contact form add-on where to page visitor goes and lets me know which resort and how many people and rooms and so on. What would be the best way to incorporate a javascript to calculate the fileds information and show it at the bottom of the form? The page is...

www.partypalacevipvacations.ca/reservations.html

On this page I need to code a way to add all the extra fees that are charged per person for individual resorts as they are selected. I looked at the html for uses of "form" so I can use document.form JS to calculate data from the fields that they fill out but dont know how to incorporate it into the current coding in the html script.

I am using the reference on this page...

http://javascript-coder.com/javascript-form/javascript-calculator-script.phtml

Is this possible to do? The demo looks like this... http://javascript-coder.com/files/calculation/cakeform.html

Any help would be much appreciated

Gepostet am
1 ANTWORTEN
Dave G.
Dave G.
User

Hi Andre, its not clear as to why you want to do this within the page using the contact object or how you want to use the calculated value(s) post the form vs. Using the shopping cart functionality for the products and additional costs?

Anyway in Step 3 you can use the properties option for the page to add your javascript by clicking on the expert tab, which you probably want to put it before end of the form body.

If you want to display it on the form, then you will need to create a field and modify the created page to populate the calculated value into the field value. Again, would be easier to use the shopping cart functionality.

Regards!

Dave

Mehr lesen
Gepostet am von Dave G.