[SOLVED] FormBuilder Submit imput class

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

[SOLVED] FormBuilder Submit imput class

Post 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">
Last edited by essexboyracer on Mon Jun 17, 2013 5:09 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: FormBuilder Submit imput class

Post by Dr.CSS »

That doesn't allow that kind of class addition, try using the div class > submit to style it...
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: FormBuilder Submit imput class

Post 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)
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

Re: FormBuilder Submit imput class

Post by essexboyracer »

Nice! Good smarty trick, will have to bookmark this thread for future use. Thank you so much
Post Reply

Return to “The Lounge”