• Resolved Graicifyd

    (@graicifyd)


    I was wondering if it’s possible to create accordion or collapsible sections in the form fields.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    The plugin does include an accordion control. So, you must emulate them with other controls, for example, with fieldset fields.

    Please, follow the steps below:

    1. Insert a fieldset field in the form with the corresponding fields within it.

    2. Insert an “HTML Content” field in the form with the following piece of code as its content:

    
    <script>
    jQuery(document).on('click', '#fbuilder .cff-container-field>fieldset>legend', function(){
    jQuery('#fbuilder .cff-container-field>fieldset>div').toggle();
    });
    </script>
    

    3. Finally, enter the following style definition block into the “Customize Form Design” attribute in the “Form Settings” tab (https://cff.dwbooster.com/images/documentation/form-settings-tab.png)

    
    #fbuilder .cff-container-field>fieldset>div{display:none;}
    #fbuilder .cff-container-field>fieldset>legend{cursor:pointer;}
    

    If you need a different behavior, do not hesitate in request a custom coding service through our private website.

    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Amazing! Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Accordions in Form’ is closed to new replies.