Header in Fabrik Form

miltonaguiar82

New Member
Hi,
I have a form in Fabrik that's working fine but the header in the form appears in all pages of the form. I would like that the header/introduction only appears in the first page and not in the following pages.
What should i do?

Kind regards,

Milton Aguiar
 
You'd have to write some Javascript which hides and shows those. We fire an event, fabrik.form.page.change.end, when page changing is complete. Something like ...

Code:
requirejs('[fab/fabrik]', function() {
   Fabrik.addEvent('fabrik.form.page.change.end', function(form, dir) {
      if (form.currentPage === 0) {
         jQuery('.page-header').show().next().show();
      }
      else {
         jQuery('.page-header').hide().next().hide();
      }
   });
});

That's off the top of my head, haven't tested it.

The code goes in ./components/com_fabrik/js/form_X.js, where X is your numeric form ID.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top