Page 1 of 1

[solved] Formbuilder - Require Date field depending on text input

Posted: Tue May 26, 2009 5:08 am
by vikram31291
Hi,
 How can I require a date field to be filled out if a corresponding text field has input in a formbuilder form? If you can't do it using formbuilder, how can I validate the form myself?

Vikram

Re: Formbuilder - Require Date field depending on text input

Posted: Tue May 26, 2009 5:55 am
by Jeff
You need to write JavaScript to validate it.

Re: Formbuilder - Require Date field depending on text input

Posted: Tue May 26, 2009 3:18 pm
by vikram31291
Do I just call my validation function where it says "Form Submission Javascript:"? and to stop the submission, does the function just have to return false or can it return a specific error message to formbuilder?

Re: Formbuilder - Require Date field depending on text input

Posted: Tue May 26, 2009 5:46 pm
by Jeff
Yes put it in Form Submission Javascript and yes returning the false should stop the submission. Just put in the JS an alert or have it add code to the page to display an error message.

Re: Formbuilder - Require Date field depending on text input

Posted: Tue May 26, 2009 7:48 pm
by vikram31291
Thanks ajprog, I got it to work.