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

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

New Here ,
Nov 08, 2018 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

545

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
Community Expert ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

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

Votes

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

Votes

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
Community Expert ,
Nov 08, 2018 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.

Votes

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

Votes

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
Community Expert ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

LATEST

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.

Votes

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