| Q: |
Can I do stuff at form submit time with addedValues forms? |
|
A: |
Yes, using onclick handlers on the submit button. For example, suppose you want to make sure your users have read terms and conditions by having them check a box before their submit succeeds, In the form layout have a button such as, <input type='submit' onClick="if (!document.membersignup['addedValues_agreeToTerms'].checked) {alert('You must check the box to agree'); return false;} return true;">: In this example, the form is called membersignup, the boolean variable agreeToTerms is true if the user agreed, and the rendering of agreeToTerms in this form is a checkbox.
|
|
Answered By: David Bayly |
|
|
Asked By: David Bayly |
|
|
Times this FAQ has been viewed: 1251 |
|