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

Get exact decimals from one textfield to another textfield

Explorer ,
Jan 30, 2018 Jan 30, 2018

Hi,

Is it possible to get the data from one textfield to another textfield. The values  should exactly match as it is for example: ("1.00245" or "1,000.02542" or "1" or "100.00" or "100.20") the result should be the same ("1.00245", 1,000.02542" or "1" or "100.00" or "100.20") and also if it is negative value we should replace as parentheses.

TOPICS
Acrobat SDK and JavaScript
363
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 ,
Jan 30, 2018 Jan 30, 2018

It is certainly possible to populate one text field with the value of another. In fact, if you just name the fields the same, it happens automatically.

However, the formatted (displayed) value and the actual value of the field can be very different. your examples have commas, trailing zeros and you are requesting parenthesis for negative numbers. All of this is possible but we'd need to know if you want the actual value that was entered into the first field to be copied to the second and allow the field formatting to take over to generate the parenthesis, commas, and training zeros or if you want the formatted value to be copied.

Please elaborate on what you want these fields to be used for.

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 ,
Feb 02, 2018 Feb 02, 2018
LATEST

The value will be in the first text filed example: "-100023.2301554" the output should be like the following value (100,023.2301554).

if the value is "1" or "10" or "100" or "1000" the output should be "1" or "10" or "100" or "1,000".

if the textfield1 has decimals the textfield2 value should be the same and textfield1 has negative numbers textfield2 should replace with parentheses.

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