1779 Posts in 582 Topics by 556 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1922 Views |
-
How to modify the search form box?

24 December 2008 at 2:10am
Hi guys,
I am implementing search on a site but have one small issue. The "Go" button sits below the search box and I want it to sit next to it. The current generated html looks like:
<div id="Search" class="field text nolabel">
<div class="middleColumn">
<input class="text nolabel" id="SearchForm_SearchForm_Search" name="Search" value="Search" type="text">
</div>
</div>
<input class="action" id="SearchForm_SearchForm_action_results" name="action_results" value="Go" title="Go" type="submit">But if I use Firebug and change it to:
<div id="Search" class="field text nolabel">
<div class="middleColumn">
<input value="Search" name="Search" id="SearchForm_SearchForm_Search" class="text nolabel" type="text">
<input title="Go" value="Go" name="action_results" id="SearchForm_SearchForm_action_results" class="action" type="submit">
</div>
</div>then its exactly what I want, I just don't know how to get it to generate it properly.
-
Re: How to modify the search form box?

27 December 2008 at 11:25pm
I would use CSS to position it where I want - if it's just a matter of visual positioning.
If you really need it to be next to it codewise this would require some subclassing because you're adding an 'action' in a 'field'. You would have to alter the way Silverstripe renders it default fields...
Take a look at sapphire/templates/SearchForm.ss...
| 1922 Views | ||
|
Page:
1
|
Go to Top |

