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

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
vikram31291
Forum Members
Forum Members
Posts: 21
Joined: Fri Aug 01, 2008 5:42 pm

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

Post 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
Last edited by vikram31291 on Tue May 26, 2009 7:49 pm, edited 1 time in total.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Formbuilder - Require Date field depending on text input

Post by Jeff »

You need to write JavaScript to validate it.
vikram31291
Forum Members
Forum Members
Posts: 21
Joined: Fri Aug 01, 2008 5:42 pm

Re: Formbuilder - Require Date field depending on text input

Post 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?
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Formbuilder - Require Date field depending on text input

Post 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.
vikram31291
Forum Members
Forum Members
Posts: 21
Joined: Fri Aug 01, 2008 5:42 pm

Re: Formbuilder - Require Date field depending on text input

Post by vikram31291 »

Thanks ajprog, I got it to work.
Post Reply

Return to “Modules/Add-Ons”