Skip to main content
2 of 2
added 970 characters in body

Using Low Search

Hi Was wondering if anyone can help me?

I have purchased Low Search and im stuck.

Basically the ultimate goal is to have a channel called franchise with say 200 different franchises/entries, with a textarea field in each filled with different postcodes seperated by a comma in each entry.

for example one entry would be:

Title: Conwy

Postcodes: ll21, ll22, ll23, ll24, ll25

At somepoint i may need to have a postcode more indepth for sameple ll21 5bd.

These are the postcodes that, that franchise covers.

I want to have the search only search the channel "franchise" and only searches the "postcode" field.

For the results i just want to go straight to the relevant entry.

Honeslty i really appreicate any help. Because i am so stuck.

Thanks,

Wes.

Hi Low,

{exp:low_search:form result_page="search/results" required="keywords" search:postcodes_covered}
 <fieldset>
<label for="keywords">Enter your postcode:</label>
<input type="search" name="keywords" id="keywords" placeholder="Enter your postcode here" class="postcode-entry" />
<span class="postcode-error">{error_message}</span>
<button type="submit" class="white-button postcode-button"><span class="fa fa-search icon"></span>Search your postcode</button>
 </fieldset>
{/exp:low_search:form}

Then the results tag was the bog standard one on the docs.

{exp:low_search:results query="{segment_3}" limit="10"}
{if count ==  1}<ol>{/if}
<li><a href="{comment_url_title_auto_path}">{title}</a></li>
{if count == total_results}</ol>{/if}
{if no_results}No search results{/if}
{/exp:low_search:results}

Sorry for being so Vague, i am just unsure how to go about this, thanks for help.

These are the postcodes in the entry for conwy in the postcodes_covered field:

LL16,LL18,LL21,LL22,LL24,LL25,LL26,LL27,LL28,LL29,LL30,LL31,LL32,LL33,LL34,LL57

So the idea is that if someone searched for ll26 5he it would return the conwy entry.

Cheers.