How can I create an input mask on a short text field to only accept numbers in a specific format?

  • Profile Image
    Tania  
    Asked on April 29, 2021 at 04:56 AM

    Bom dia

    Já criei um formulário mas preciso colocar uma regra por exemplo

    Tem um campo com CNPJ ,preciso colocar a regra que somente são números que comecem dk zero e com pontos e barra


    Como faço?

  • Profile Image
    Marco_S
    Answered on April 29, 2021 at 09:54 AM

    Hello there,

    Thanks for reaching out to us!

    From what I can understand reading from Wikipedia (https://en.wikipedia.org/wiki/CNPJ), the CNPJ code is an identification number issued to Brazilian companies and it accepts the following format:

    00.000.000/0000-00

    You can create specific masks for your Short Text field, to make sure that users will fill out the field in the correct way, by enabling the Input Mask property from the Short Text settings.

    Check out the following screencast to see how to do it:

    1619704404_608aba540bb42_input_mask.gif


    Please take a look at our guide about Input Masks to learn more:

    https://www.jotform.com/help/381-getting-started-with-the-basics-of-input-masking


    Let us know if you need any further assistance!

    Marco