- sergio56Asked on February 06, 2012 at 05:41 PM
i need a form with a default value equal to one other form value.
exemple: = (form 1 value) & (form 2 value)..
The values are text, not calc.
Is it possible?
- JotForm SupportabajanAnswered on February 06, 2012 at 06:13 PM
Looking forward to hearing from you again.
- sergio56Answered on February 06, 2012 at 06:30 PM
i commised one error: i'm talking about field but not form
field 1 : 'toto'
field 2 : 'tata'
> field 3= 'tototata'
how can i access to the edited version of the form's full source?
- JotForm SupportabajanAnswered on February 06, 2012 at 06:47 PM
- JotForm SupportabajanAnswered on February 06, 2012 at 10:29 PM
The simple form on this page demonstrates the functionality you want.
So how was it done?
1. The form was constructed in the form builder and its source code copied from the Embed Form Wizard and pasted into the web page
A Brief Explanation of the Function
document.getElementById("input_5").value is the value of the 3rd text box's input
document.getElementById("input_3").value is the value of the 1st text box's input
document.getElementById("input_4").value is the value of the 2nd text box's input
Whatever is on the right of the equals sign is calculated (in this case, combined with the use of the "+" operator) and the result assigned to the variable on its left. So, when the function is called (by its name: combineEntries) via the event handler, it combines the values (user entries) of the 1st and 2nd text boxes and displays the result in the 3rd text box.
It's not the best explanation in the world but I hope it helps to clarify things a bit. If you view the source of the demo page, you'll see the changes to the form's code described in Steps 2 and 3 above.
- sergio56Answered on February 11, 2012 at 08:51 PM
Thank you for your answer.
i understand all but my problem is : can i change my jotform code without have to paste code into web page? (my web page uses only jotform form url)
- JotForm SupportabajanAnswered on February 11, 2012 at 09:00 PM
No, this particular solution requires that the code be pasted into a web page. If you don't have a website, we can recommend various hosting solutions for the form.
- sergio56Answered on February 11, 2012 at 09:08 PM
- JotForm SupportabajanAnswered on February 12, 2012 at 06:28 PM