addedValues Plugin

...Powerful Free! Database Expansion for Manila

(1 or more words)

Get tropes here!
Click to see internals
Report bug

Arcade Fire

Viewable with Any Browser

Join Now

FAQ 1071


Can I do stuff at form submit time with addedValues forms?


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: 2697

Return To FAQ