Assigning style class to search form

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
howey
Forum Members
Forum Members
Posts: 158
Joined: Fri Sep 14, 2007 1:05 pm

Assigning style class to search form

Post by howey »

Hi, I was trying to find a way of applying css class values to the cms search form. The deafault class applied is cms_form. I am using a bootstrap framework and would like to add the search form in the navbar, but need to use the classes

Code: Select all

<form class="navbar-form navbar-right"
Can anyone suggest how to do this the only way I've managed this is by altering the modform.inc.php, which will create problems later.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Assigning style class to search form

Post by velden »

One way is to change the Search form template:

Code: Select all

{$startform|replace:'cms_form':'navbar-form navbar-right'}
howey
Forum Members
Forum Members
Posts: 158
Joined: Fri Sep 14, 2007 1:05 pm

Re: Assigning style class to search form [solved]

Post by howey »

Hi

Thanks, that is much better way. I new there must be a simpler, better way than cobbling together files.

Thanks again.
Post Reply

Return to “The Lounge”