1 Reply Latest reply on Sep 17, 2014 8:34 PM by Keihamm

    Dealer Locator - Empty Zipcode Field


      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?




        • 1. Re: Dealer Locator - Empty Zipcode Field
          Keihamm Level 1

          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.