Page 1 of 1

[Solved]FormBuilder - is it possible to ...

Posted: Wed Feb 26, 2014 7:32 am
by jasnick
Using 1.11.10 and latest modules

Formbuilder - Simple Registration Form includes a series of radio buttons for States and users select the State in which they are located.

Is it possible to have another set of fields come up (for address and phone) on one particular State only? I need the full address etc of registrations in my own State to add them to a local database.

If so, how is it coded?

Thanks

Re: FormBuilder - is it possible to ...

Posted: Wed Feb 26, 2014 9:10 am
by velden
Assuming 'Simple Registration Form' is a customizable form of FormBuilder.

I would add those two extra fields to formbuilder. Don't make them required. Hide them with some css.

Then use some jQuery to check whether specific radiobutton is checked. If so unhide the two extra fields.

If you want to make sure those fields are filled together with the specific state use an UDT for form validation.

Re: FormBuilder - is it possible to ...

Posted: Wed Feb 26, 2014 11:43 pm
by jasnick
Thanks velden - yes, ordinary FB contact form. I've just googled
velden wrote:jQuery to check whether specific radiobutton is checked.
and found a few articles that should put me on the right track.
Thanks again.