Jump to content

search form


Guest intergemsuk

Recommended Posts

Guest intergemsuk

I have seen other sites with the words "search" in the search form box. How do i change the the value of the search box so it displays the word "search site" i know its fairly simple...

cheers,

ben

Link to comment
Share on other sites

In your skins/your skin/boxes/searchForm.tpl:

<!-- BEGIN: search_form -->

<form action="index.php" method="get">

<span class="txtSearch"><strong>{LANG_SEARCH_FOR}</strong></span> <input name="searchStr" type="text" class="searchBox" id="searchStr" value="{SEARCHSTR}" size="20" />

<input type="hidden" name="act" value="viewCat" />

<input name="Submit" value="Search Site" type="submit" class="searchBtn" value="{LANG_GO}" />

</form>

<!-- END: search_form -->

Add the part in red.

Link to comment
Share on other sites

Guest intergemsuk

Thanks for your reply,

it doesnt do what i was trying to achieve. i want the "Search Site" text to be displayed within the search form ie where the user types in their search request. So they can type of the text "Search Site", i have seen this on other sites just not sure how to achieve it. I have tried shifting the code: value="Search Site" around but not sure exactly where it goes?

cheers,

ben.

Link to comment
Share on other sites

You add it there where the box is defined, and the value there now is a variable, value="{SEARCHSTR}"

You can change this to:

<!-- BEGIN: search_form -->

<form action="index.php" method="get">

<span class="txtSearch"><strong>{LANG_SEARCH_FOR}</strong></span> <input name="searchStr" type="text" class="searchBox" id="searchStr" value="Search Site" size="20" />

<input type="hidden" name="act" value="viewCat" />

<input name="Submit" type="submit" class="searchBtn" value="{LANG_GO}" />

</form>

<!-- END: search_form -->

It might then put "Search site" back in the box when you reach each new search page . . .

Link to comment
Share on other sites

Guest intergemsuk

thank you for your help, could the same be achieved with the mailing form? Would like it to say "you email" in the form. have tried similiar code to the search form buy cant seem to get it to work?

cheers,

ben.

<!-- BEGIN: mail_list -->

<div class="boxTitleRight">{LANG_MAIL_LIST_TITLE}</div>

<div class="boxContentRight txtCopy">

{LANG_MAIL_LIST_DESC}

<!-- BEGIN: form -->

<form action="{FORM_METHOD}" method="post">

<strong>{LANG_EMAIL}</strong> <input name="email" type="text" size="14" maxlength="255" class="textbox" />

<input type="hidden" name="act" value="mailList" />

<div style="padding-top: 5px; text-align: center;">

<input name="submit" type="submit" value="{LANG_GO}" class="submit" />

</div>

</form>

<!-- END: form -->

</div>

<!-- END: mail_list -->

Link to comment
Share on other sites

Did you try it here?

<!-- BEGIN: mail_list -->

<div class="boxTitleRight">{LANG_MAIL_LIST_TITLE}</div>

<div class="boxContentRight txtCopy">

{LANG_MAIL_LIST_DESC}

<!-- BEGIN: form -->

<form action="{FORM_METHOD}" method="post">

<strong>{LANG_EMAIL}</strong> <input name="email" type="text" size="14" maxlength="255" value="your email" class="textbox" />

<input type="hidden" name="act" value="mailList" />

<div style="padding-top: 5px; text-align: center;">

<input name="submit" type="submit" value="{LANG_GO}" class="submit" />

</div>

</form>

<!-- END: form -->

</div>

<!-- END: mail_list -->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...