Page 1 of 1
Custom class for FormBuilder form
Posted: Mon Jul 07, 2014 11:09 am
by chillifish
I'm trying to use the Pure CSS (
http://purecss.io/) form template. However, it requires that I give the form a class. Unfortunately, I can't find where to change that anywhere. Where it says "CSS Class for this form:", it just creates a div at the start of the form.
It doesn't seem to be included in the Form Template, the beginning of the template is called by $fb_form_start. I've searched through the module classes to find out where that might be, but I can't find it anywhere.
Re: Custom class for FormBuilder form
Posted: Mon Jul 07, 2014 11:53 am
by chillifish
Actually, it doesn't seem that the form element needs to be labelled, it works with the containing div that formbrowser creates.
Would be useful to know the answer though.
Re: Custom class for FormBuilder form
Posted: Mon Jul 07, 2014 12:46 pm
by staartmees
select the form in the list
tab main >> CSS Class for this form: here you set e.g. formbuilder
also read
https://www.cmscanbesimple.org/blog/styling-forms
Re: Custom class for FormBuilder form
Posted: Mon Jul 07, 2014 2:36 pm
by velden
There's always the (less efficient though effective) replace modifier:
Code: Select all
{FormBuilder|replace:'<form':'<form class="your-class"' form='yourformalias'}
It's untested example. Make sure it doesn't get two class attributes etc.
Re: Custom class for FormBuilder form
Posted: Tue Jul 08, 2014 12:41 pm
by chillifish
velden wrote:There's always the (less efficient though effective) replace modifier:
Code: Select all
{FormBuilder|replace:'<form':'<form class="your-class"' form='yourformalias'}
It's untested example. Make sure it doesn't get two class attributes etc.
That's useful, thanks.