• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Dealer Locator - Empty Zipcode Field

New Here ,
Aug 15, 2014 Aug 15, 2014

Copy link to clipboard

Copied

Hey All

I have setup a dealer locator and it is displaying everything fine and dandy. But what I have noticed is that there if you leave the zipcode blank and hit submits it will display all the locations which is something I do not want. Is there something in BC that can disable this or would I need some jquery to validate?

Thanks

Derek

TOPICS
Web apps

Views

365

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 17, 2014 Sep 17, 2014

Copy link to clipboard

Copied

LATEST

Are you using the search by state option? If not, just modify the function that is already included with the form. You need to make sure your numbers match the form you are using. See -checkWholeFormXXXX and Postcode_XXXXX (2 times)

<script type="text/javascript">function checkWholeForm2092(theForm){var why = "";if (theForm.Postcode_25048) why += isEmpty(theForm.Postcode_25048.value, "Please Enter Zipcode!");{alert(why);return false;}return true;}</script>

If you are using the state option you will then use jquery/javascript to write your own function before running this one, or write your own completely. Either way, hope this points you in the right direction.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines