Show/hide form textboxes based upon form dropdown list selec

Posted by Community Admin on 04-Aug-2018 13:47

Show/hide form textboxes based upon form dropdown list selection

All Replies

Posted by Community Admin on 21-Aug-2012 00:00

Hello all, me again.

Ok I have a form that has a drop down list with two options: Free trial & full

Depending upon which of these is selected, I would like to show/hide subsequent form textboxes.

How would I go about doing this?

Is it possible to add jquery functionality to specific forms?

Any advice greatly received.

Rich

Posted by Community Admin on 02-Oct-2012 00:00

Hi,

You can add jquery functionality to your form by assigning a unique class to your fields in the form builder:
    Open form, click the Edit button for your field
    Select the Appearance tab
    Add your unique css class and save form

 You can then add a jquery change function to the page that will display your form.  You can do this either in a master page or by adding a javascript widget to you page which is listed in the toolbox under Scripts and Styles.

Example jquery function that will hide a field when the select field changes:

$('.mySelectListClass').change(function()
 
   $(".classOfFieldToHide").attr("style", "display: none;");
 
);

Thanks,

Randy

This thread is closed