Page 1 of 1

[SOLVED] FormBuilder Submit imput class

Posted: Thu Jun 13, 2013 12:27 pm
by essexboyracer
I am trying to add a class to the submit button on a FormBuilder form. Whilst I could probably achieve it using jquery, why go to the expense when there is a form display template. I can't though see how to add a class, called "btn" to the input tag.

The last part of the template looks like:

Code: Select all

	<div class="submit">{$prev}{$submit}</div>
	</div>
	{$fb_form_end}
I am using twitter bootstrap so would want the output to look a little like:

Code: Select all

<input type="submit" value="Submit Form" id="cntnt01fbrp_submit" name="cntnt01fbrp_submit" class="cms_submit fbsubmit btn">

Re: FormBuilder Submit imput class

Posted: Thu Jun 13, 2013 3:32 pm
by Dr.CSS
That doesn't allow that kind of class addition, try using the div class > submit to style it...

Re: FormBuilder Submit imput class

Posted: Thu Jun 13, 2013 3:56 pm
by psy
Change yr formbuilder tag to

Code: Select all

{Formbuilder|replace:'cms_submit':'btn' form=myform}
I use this with bootstrap (or 'button' for zurb)

Re: FormBuilder Submit imput class

Posted: Fri Jun 14, 2013 1:10 pm
by essexboyracer
Nice! Good smarty trick, will have to bookmark this thread for future use. Thank you so much