• Fabrik4.5.3 for J!5.3.0 and J!4.2+is out

    You must update from Fabrik4.5.1 if you are running Joomla!5.3.0

    See Announcements

Accordion Form Groups

  • Views Views: 11,203
  • Last updated Last updated:
  • Accordion Groups are a standard way of displaying lengthy Forms in Joomla. Forms will show only one Group of Elements at a time, closing the existing open Group when you open a different Group.

    Fabrik 3.0 :
    Presuming your form has an id of 1 then create a 1.js file in components/com_fabrik/js and enter the following Javascript into the file:
    window.addEvent('domready', function() {
        var handles = document.getElements('legend');
        var Elements = document.getElements('fieldset > ul, fieldset > .fabrikSubGroup');
        var myAccordion = new Fx.Accordion(handles , Elements);
    });
    Each group heading when clicked on will hide the other Groups content and show its own - see Mootools Accordion documentation.

    You may need to tweak your form template to ensure a minimum height for each fieldset:
    CSS:
    fieldset {
        min-height:21px;
    }
Back
Top