Quantcast
Channel: YUILibrary.com :: Form
Viewing all articles
Browse latest Browse all 27

validate on a button click event rather than onSubmit

$
0
0
Hi,

I'm not a YUI or javascript expert, but I would really like to use Form to help me validate form fields.

I have a simple mortgage calculator with three input fields (loan_amount, interest_rate, loan_term) and I don't need to submit the form, just detect a click on a Calculate button, perform, the calculation and show the result in a read-only field. However, I do need to validate the 3 input fields before I perform the calculation. At the moment, it looks like validation is performed when the submit event is detected. Since I have my form set up with onsubmit="return(false);", can I configure form to use another event?

TIA,
Nick

Viewing all articles
Browse latest Browse all 27

Trending Articles