We have created a form which has some calculations in it using JavaScript events.
When the user selects the number of properties from a dropdown control, a cost estimate (text input field) is automatically updated.
eg. The person selects '3', then a text input field on the page updates to 3 * 5 (15).
My problem is that if the user fails the captcha for any reason when submitting the form, the page re-loads and any values I have set using javascript are lost.
Just wondering if there is any way to retain this field value? All other form fields in which data was manually entered retain their values/selections.
I am new to using Squiz Matrix Forms, so perhaps there is a better way to set the field/asset value?
I'm currently using the method below:
onchange="{$('#q13690_q5').val($('#q13685_q13').val() * $('#q13688_q2').val());}
Any ideas or advice would be much appreciated.
Thanks,
Jono