Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
3

Limit Number field to Maximum Number and other character limit question

Explorer ,
Jun 29, 2023 Jun 29, 2023

I have 2 percentage fields. I use the number format instead for this instead of the percentage format option.

 

1) If one of the fields is only up to maximum of 5%, how do I set that up to that limit?

2) Second percentage field allowed up to 100%. So if I set the character limit to 3 characters, will it allow me to enter a decimal character? e.g. 50.75. For some reason, I am getting a rounded up number.

 

 

TOPICS
JavaScript , PDF , PDF forms , Standards and accessibility
895
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Jun 29, 2023 Jun 29, 2023

1) It's not clear what you mean. You want to limit the value of the field to only 0-5? If so, see #2.

2) Using a character limit is not a good idea. If you limit it to 3 digits they could still enter "567"...

You can simply use the Range option in the Validate tab (since you've set the Format to Number) to only accept values between 0 and 100:

try67_0-1688070286027.png

 

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 29, 2023 Jun 29, 2023

1) It's not clear what you mean. You want to limit the value of the field to only 0-5? If so, see #2.

2) Using a character limit is not a good idea. If you limit it to 3 digits they could still enter "567"...

You can simply use the Range option in the Validate tab (since you've set the Format to Number) to only accept values between 0 and 100:

try67_0-1688070286027.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 29, 2023 Jun 29, 2023

I have never used this before despite seeing it. Thank you so much! 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 30, 2023 Jun 30, 2023

Is there any way to include 2 digits in the decimals rather than just keeping it rounded up to whole numbers? Or does that require coding? Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 30, 2023 Jun 30, 2023
LATEST

You can set the number of decimals shown in the Format tab.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines