Page 1 of 1

Assigning style class to search form

Posted: Sun Jun 26, 2016 12:51 pm
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.

Re: Assigning style class to search form

Posted: Mon Jun 27, 2016 8:06 am
by velden
One way is to change the Search form template:

Code: Select all

{$startform|replace:'cms_form':'navbar-form navbar-right'}

Re: Assigning style class to search form [solved]

Posted: Mon Jun 27, 2016 9:41 am
by howey
Hi

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

Thanks again.