How to format a text field with either alpha/numeric (2 decimal & thousand separator)

New Here ,
Nov 08, 2018

Copy link to clipboard

Copied

Currently I've designed a form with text fields whereby I can either type in "Not applicable" or numerical values. However, the default formatting does not cater to my requirements. Can anyone kindly guide me in regards to formatting using Javascript as I'm totally new to Javascript?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

123

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

How to format a text field with either alpha/numeric (2 decimal & thousand separator)

New Here ,
Nov 08, 2018

Copy link to clipboard

Copied

Currently I've designed a form with text fields whereby I can either type in "Not applicable" or numerical values. However, the default formatting does not cater to my requirements. Can anyone kindly guide me in regards to formatting using Javascript as I'm totally new to Javascript?

TOPICS
Acrobat SDK and JavaScript, Windows

Views

124

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
Nov 08, 2018 0
Most Valuable Participant ,
Nov 08, 2018

Copy link to clipboard

Copied

What kind of "formatting" are you referring to, exactly?

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
Reply
Loading...
Nov 08, 2018 0
New Here ,
Nov 08, 2018

Copy link to clipboard

Copied

At the moment, if I use the default choice available (such as number) when selecting format category from format tab in properties, then I can't type in "Not applicable" in that particular text field since an error message will appear. However, if i choose none, then when I type in numerical such as 1000, it will remain exactly as 1000. I'm hoping that it will auto format for me into 1,000.00.

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
Reply
Loading...
Nov 08, 2018 0
Most Valuable Participant ,
Nov 08, 2018

Copy link to clipboard

Copied

You will need to write your own custom Format (and Validation) script to be able to do it.

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
Reply
Loading...
Nov 08, 2018 0
New Here ,
Nov 08, 2018

Copy link to clipboard

Copied

Wondering if you can provide me with the custom format & validation script? I've no basic knowledge of Javascript and unsure how to begin creating custom script.

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
Reply
Loading...
Nov 08, 2018 0
try67 LATEST
Most Valuable Participant ,
Nov 08, 2018

Copy link to clipboard

Copied

I can create it for you, for a small fee. You can contact me privately (try6767 at gmail.com) to discuss it further, if you're interested.

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
Reply
Loading...
Nov 08, 2018 0