You are viewing limited content. For full access, please sign in.

Question

Question

limit a form field to up to 9 numbers

asked on August 7, 2019

I need a form field where the data can only be numbers and the field can contain up to 9 digits.  So its OK if there's 5 numbers but there can't be more than 9 digits.  I've tried setting up a number field with values from 1 min 999999999 max - didn't work.  Also tried text field with a regular expression \d{1,9} but it didn't stop me at 9 digits.

Has anyone solved this?

Thanks

Sandy

0 0

Answer

SELECTED ANSWER
replied on August 7, 2019 Show version history

Hi Sandy,

 

   It should work using a single line field with your constraint of \d{1,9}. You can set the character limit there to 9. I created one in a test form and it worked just fine. Not sure if it matters, but I'm using Forms 10.3.1.

 

 

Thanks,

Michael

1 0

Replies

replied on August 8, 2019

That's it!  Thanks!  I was relying on the regular expression to limit the input to 9 characters.

0 0
replied on August 8, 2019

You're quite welcome. I'm glad I was able to help.

 

Thanks,

Michael

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.