Re: PostCode Lookup - Displaying all results
Posted: Tue Aug 03, 2010 5:11 pm
Hi, maybe my solution can help you... I had the same problem with searching with an empty value zip code (after this module display all points in db). I used javascript. When user didn't input any value in field and click 'submit' see on screen window alert.
If you are interested, hier is two steps how I made this:
1. First - copy this javascript code and paste it on begin your search template (on red are my coments, not code):
{literal}
{/literal}
OK, we have included javascript.
2. Second - in search template in line when is called form change tag {$formstart} for this:
{$formstart|replace:'class="cms_form"':'class="cms_form" onsubmit="return formCheck(this);"'}.
Best regards,
Marek A.
BTW - I'm not sure that is a bug... but if I input value "0" in field I see all points (in Poland isn't postal code "0", so module shoud display error with bad code....)
If you are interested, hier is two steps how I made this:
1. First - copy this javascript code and paste it on begin your search template (on red are my coments, not code):
{literal}
{/literal}
OK, we have included javascript.
2. Second - in search template in line when is called form change tag {$formstart} for this:
{$formstart|replace:'class="cms_form"':'class="cms_form" onsubmit="return formCheck(this);"'}.
Best regards,
Marek A.
BTW - I'm not sure that is a bug... but if I input value "0" in field I see all points (in Poland isn't postal code "0", so module shoud display error with bad code....)