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

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

New Here ,
Nov 08, 2018 Nov 08, 2018

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

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

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

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.

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

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

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

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.

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

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