1794 Posts in 590 Topics by 562 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 766 Views |
-
modify <input> value="" attribute for search form

24 March 2011 at 1:58am
Hi,
I want to modify the <input value=""> for the search to display a "search now" message. But I don't know where should I do this.
Any word of advice?Thanks
-
Re: modify <input> value="" attribute for search form

24 March 2011 at 6:51am
i don't like forms being generated by code, so usually i just build the html on my own.
so instead of using $SearchForm in your template, you could place the following there:
<form enctype="application/x-www-form-urlencoded" method="get" action="/sip_wagner/home/SearchForm" id="SearchForm_SearchForm">
<fieldset>
<legend></legend>
<div class="field text nolabel" id="Search"><div class="middleColumn"><input type="text" value="herr" name="Search" id="SearchForm_SearchForm_Search" class="text nolabel"></div></div>
<input type="hidden" value="de_AT" name="locale" id="SearchForm_SearchForm_locale" class="hidden">
<input type="submit" title="Go" value="Search Now" name="action_results" id="SearchForm_SearchForm_action_results" class="action ">
</fieldset>
</form>that's exactly the output of $SearchForm (have a look at the html $SearchForm generates by viewing the sourcecode of your page), only thing i modified is the button value, as you requested.
some might argue that this should be done modifying the code to generate the form itself, which you could do by extending the SearchForm class, just post back if you need any help there.
-
Re: modify <input> value="" attribute for search form

24 March 2011 at 8:47pm
Yes, is working perfectly!
I don't know why I've neglected viewing the page source
Thank you for the hints
| 766 Views | ||
|
Page:
1
|
Go to Top |


