Inbox mask to force length.

  • ChartallBusinessCollege
    Asked on August 5, 2016 at 6:17 AM

    Hi there,

     

    I have a required field with the following input mask for a phone number: 27 ## ### ####

     

    However some users can type in only one number and then proceed. 

    I would like to force the user to enter a full valid phone number. Is this possible?

  • Mike_G JotForm Support
    Replied on August 5, 2016 at 10:24 AM

    May I suggest you try to use the "Phone Number" field instead and set an input mask.

    Inbox mask to force length Screenshot 30

    Then, to adjust the width of the new "Phone Number" field, you can add the CSS codes below to your form. How-to-Inject-Custom-CSS-Codes

    #input_133_full {

        width: 325px !important;

    }

    To get the correct field ID of the new field, here's what you need to do:

    Inbox mask to force length Screenshot 41

    As for the missing sub-label, "Mobile Phone", add the codes below.

    #id_133 label#sublabel_masked:after {

        content: "Mobile Phone";

    }

    You can do the same for the "Office phone number", however, you need to set a different "sub-label for it. 

    #id_134 label#sublabel_masked:after {

        content: "Office phone number";

    }

    Here's a clone version of your form where I have applied the changes mentioned above: 

    https://form.jotform.com/62173505369963

    I hope this helps. If you need any further assistance, please feel free to contact us anytime. Thank you.