What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Conditions in the postcode field

    Asked by mrborry on December 02, 2014 at 08:16 AM

    Hi,

    I am doing a booking form that should only allow customers within a certain area. Specifically the DT1, DT2, DT3, DT4 & DT5 areas. Can you advise me the best way to accomplish this?

     

    Kind Regards

     

    Page URL:
    http://form.jotformpro.com/form/43283813054957

    POST booking form condition
  • Profile Image
    JotForm Support

    Answered by Charlie on December 02, 2014 at 09:52 AM

    Hi,

    Upon checking your form, I've cloned it for testing purposes. 

    Here is my cloned form: http://form.jotformpro.com/form/43354005194954.

    What it does is when the Postcode field is not DT1, DT2, DT3, DT4 or DT5 the submit button will not show up.

    This is how I made the changes:

    1. I remove the Postcode field in the Address field.

    2. I then added a textbox that will act as the Postcode field.

    3. I'll add a condition to where when the rule is met it will show the submit button. 

    4. In this condition it will only accept inputs equal to DT1 to DT5.

     

    5. After that, I will add a custom CSS code to hide the main label so that the sublabel will be the only one shown.

    Here's the code:

    #label_22 {

    display:none;

    }

     

    You can also clone my form using this guide: http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

     

    I hope this helps. Let us know if you need further assistance on this.

    Thank you.

  • Profile Image

    Answered by mrborry on December 02, 2014 at 10:00 AM

    Hi,

     

    Thanks for the quick response, its nearly exactly what I need, but the DT1-DT5 is just the pre-requisite. So for example: The user would type something like DT40ED, not just DT4. 

    I need it so anyone in the catchment area of the DT1-DT5 areas can finish the postcode off with whatever extension they have

    Hope that makes sense

     

    Kind regards

  • Profile Image
    JotForm Support

    Answered by Charlie on December 02, 2014 at 10:50 AM

    Hi,

    If that's the case, we'll just need to change the condition's rule from "Equal To" to "Contains".

    Here's the screenshot of my conditions:

     

    When the user types anything with the DT1-DT5 on the PostCode, it will allow the users to submit the form.

    You can also explore the different rules in the Conditions settings, aside from "Equal To" and "Contains" you can also use "Starts With".

    You can check again the cloned form I have, it should be updated right now. 

    Thank you.