addedValues Plugin

...Powerful Free! Database Expansion for Manila
logoBottle:

(1 or more words)


Get tropes here!
Click to see internals
Report bug


Land-Rovers of Switzerland

sitepic_lrosscreenshot.gif:
Viewable with Any Browser

Members
Join Now
Login

FAQ 1071

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

Return To FAQ