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:
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:
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
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: [gversion] 1 Search field for searching multiple fields
By Dave - May 24, 2012
Hi Greg,
The automatic search features don't support searching by both keyword and exact match at the same time. You can do either:
product,num_keyword
or
product,num_match
One solution might be to create two different fields.
Let me know if that works or any other questions.
The automatic search features don't support searching by both keyword and exact match at the same time. You can do either:
product,num_keyword
or
product,num_match
One solution might be to create two different fields.
Let me know if that works or any other questions.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com
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
Thanks so much for your help with that. Using the "product,num_keyword " option seems to be fine.
Regards,
Greg