decimal

Participant ,
Jun 03, 2022 Jun 03, 2022

Copy link to clipboard

Copied

I am trying to find the way to prevent a text field from ever using decimals. I forgot the method?

TOPICS
Create PDFs , PDF forms

Views

55

Likes

Translate

Translate

Report

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

correct answers 1 Correct answer

Adobe Community Professional , Jun 03, 2022 Jun 03, 2022

Use this code as the field's custom Keystroke script:

 

event.rc = /^\d*$/.test(event.change);

Likes

Translate

Translate
Adobe Community Professional ,
Jun 03, 2022 Jun 03, 2022

Copy link to clipboard

Copied

Set field format to number and select 0 decimals.

Likes

Translate

Translate

Report

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
Participant ,
Jun 03, 2022 Jun 03, 2022

Copy link to clipboard

Copied

that does not work. I want the field to accept  WHOLE NUMBERS. no POINT NO COMMA NO LETTERS.

It might need js

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jun 03, 2022 Jun 03, 2022

Copy link to clipboard

Copied

Use this code as the field's custom Keystroke script:

 

event.rc = /^\d*$/.test(event.change);

Likes

Translate

Translate

Report

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
Participant ,
Jun 04, 2022 Jun 04, 2022

Copy link to clipboard

Copied

LATEST

TRY67 has the correct answer, as usual. Thank you. 🙂

Likes

Translate

Translate

Report

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
Participant ,
Jun 04, 2022 Jun 04, 2022

Copy link to clipboard

Copied

Sorry, you did not have the correct answer, your method still allows the comma and period.

 

Likes

Translate

Translate

Report

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