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
[solved] Formbuilder - Require Date field depending on text input
-
- Forum Members
- Posts: 21
- Joined: Fri Aug 01, 2008 5:42 pm
[solved] Formbuilder - Require Date field depending on text input
Last edited by vikram31291 on Tue May 26, 2009 7:49 pm, edited 1 time in total.
Re: Formbuilder - Require Date field depending on text input
You need to write JavaScript to validate it.
-
- Forum Members
- Posts: 21
- Joined: Fri Aug 01, 2008 5:42 pm
Re: Formbuilder - Require Date field depending on text input
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
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.
-
- Forum Members
- Posts: 21
- Joined: Fri Aug 01, 2008 5:42 pm
Re: Formbuilder - Require Date field depending on text input
Thanks ajprog, I got it to work.