I want to set the mask to it can be either one mask or another

  • tutuprat
    Asked on October 4, 2018 at 2:25 PM

    hey, I want to set the mask to it can be either number like 09.15 ##.## or 2.01 #.##

    not sure how to set the mask so it works for both

  • Richie JotForm Support
    Replied on October 4, 2018 at 3:35 PM

    I'm not sure I understood your question clearly. Do you want to set your text to mask the number 09 with a dot?

    You just add the number before you separate with the symbols.

    Sample screenshot.

    I want to set the mask to it can be either one mask or another Image 1 Screenshot 30

    Sample screen cast:

    I want to set the mask to it can be either one mask or another Image 2 Screenshot 41

    Please give it a try and let us know how it goes.

    Thank you.

  • Mike
    Replied on October 4, 2018 at 8:13 PM

    I am afraid that the input mask option is not that flexible.

    We cannot specify two different input mask in the same field unless we use some conditional logic.

    For example, if the numbers starting from 2 are supposed to use a different mask, we can implement it with conditions:

    I want to set the mask to it can be either one mask or another Image 1 Screenshot 20

    Example:

    https://form.jotform.com/82767312241959

  • tutuprat
    Replied on October 4, 2018 at 8:18 PM

    Hi, 


    Many thanks for your answer, this totally makes sense. I didn't know you could add conditions to the masks.


    Cheers,

  • tutuprat
    Replied on October 5, 2018 at 2:52 AM

    Now I'm having second thoughts about this as it would not actually work.

    What if I have a number 12.08 and other 1.06, they would be under the same condition :(


  • Victoria_K
    Replied on October 5, 2018 at 7:05 AM

    Unfortunately, this does not seem to be implementable if you do not have exact condition when to set the #.## mask. You could advise your users to start with 0 in this case and to keep the ##.## mask or to change it to #.## conditionally if input starts from zero.

    Hope this helps.