Custom class for FormBuilder form

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
chillifish
Forum Members
Forum Members
Posts: 92
Joined: Wed Jul 27, 2011 9:26 am

Custom class for FormBuilder form

Post 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.
chillifish
Forum Members
Forum Members
Posts: 92
Joined: Wed Jul 27, 2011 9:26 am

Re: Custom class for FormBuilder form

Post 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.
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Custom class for FormBuilder form

Post 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
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Custom class for FormBuilder form

Post 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.
chillifish
Forum Members
Forum Members
Posts: 92
Joined: Wed Jul 27, 2011 9:26 am

Re: Custom class for FormBuilder form

Post 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.
Post Reply

Return to “Modules/Add-Ons”