Search block

Permalink
Don't know if anyone can point me in the right direction, I am trying to get my html markup to work with the C5 search block but don't really know how to go about it. this is the code I have...

<div id="search">
<form action="">
<fieldset>
<input type="text" value="Search:" onclick="this.value='';" />
</fieldset>
</form>
</div>

Many thanks

David

dhdesign
 
cannonf700 replied on at Permalink Best Answer Reply
cannonf700
Magicmark,
You should be using 'Firebug' with firefox to help you with some of these coding solutions.

1. create a search block with C5's default search block.
2. using firebug - view the code the search block produces. something like this:

<form method="get" action="/index.php/search/">
<input type="text" class="text" name="query" />
<input type="hidden" value="" name="search_paths[]">
<input type="submit" class="submit" value="Search" />
</form>

This code will post your results to a separate page called 'search' (that you have to create) you can change the location of your search results by changing the url in the "action" class.

so for you code replace your <form action=""> with the first line of code I provided. you will need the other lines of code as well so insert them between the <fieldset> tags. you will have to play around with it to get it just right and maybe even delete your original code with the "onclick" value.

When you get the code right you can then delete the C5 search block you created to study the code. Please note that if you choose to have your results shown on a separate page - that page must have a search block on it - your search results will appear underneath wherever that search block is (main content area is probably the best place.)

good luck!
dhdesign replied on at Permalink Reply
dhdesign
Thanks for the pointers, really useful. That worked a treat and looks just as intended the style sheets take care of that.
I have the amended code if anyone is interested
Thanks
David
Cahueya replied on at Permalink Reply
Hi, i just wanted to reopen this thread instead of posting a new one.

I am using the theme EcoLiving, where Search Form is not included to the theme.

What i want to change is the position and text size of the "Search" Title which is currently on top of the search box.

So, does any of you guys know which value in which file needs to be changed for that?

Thanks a lot for any hints!

Nick