1 Search field for searching multiple fields

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 25, 2012   (RSS)

By gversion - May 24, 2012

Hello,

I have the following simple search form that currently searches based on the product name and works fine:

<form action="/searchResults.php" class="search-form">
<fieldset>
<span class="text"><input id='keyword' name="product_keyword" type="text" /></span>
<input type="submit" class="btn" value="go" />
</fieldset>
</form>



I would like this field to also search for the listing IDs (i.e. "num"), so I have tried changing the code to be as follows:


<form action="/searchResults.php" class="search-form">
<fieldset>
<span class="text"><input id='keyword' name="product_keyword,num_match" type="text" /></span>
<input type="submit" class="btn" value="go" />
</fieldset>
</form>


This new code searches for the Listing ID and works fine but no longer displays any search results when I try searching by keyword.

Is what I am trying to achieve possible? If so, could you please help me out?

Thank you,
Greg

Re: [Dave] 1 Search field for searching multiple fields

By gversion - May 25, 2012

Hi Dave,

Thanks so much for your help with that. Using the "product,num_keyword " option seems to be fine.

Regards,
Greg