custom format

Aug 15, 2020

Copy link to clipboard

Copied

If I use this code for example AFNumber_Format(2, 0, 0, 0, "$", true);  how can i get currency to show on right side of value? also can it have 2 currency symbol one on the left, and one on the right?

Use this as custom format script:

event.value = util.printf("$%,0.2f$",event.value);

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms

Views

73

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

custom format

Aug 15, 2020

Copy link to clipboard

Copied

If I use this code for example AFNumber_Format(2, 0, 0, 0, "$", true);  how can i get currency to show on right side of value? also can it have 2 currency symbol one on the left, and one on the right?

Use this as custom format script:

event.value = util.printf("$%,0.2f$",event.value);

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms

Views

74

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
Aug 15, 2020 0
Aug 15, 2020

Copy link to clipboard

Copied

Look at the description of AFNumber_Format.

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...
Aug 15, 2020 0
Aug 15, 2020

Copy link to clipboard

Copied

thx found it how to get it on the right . What about second question to show on both side?

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...
Aug 15, 2020 0
Aug 15, 2020

Copy link to clipboard

Copied

For this you must create your own format 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...
Aug 15, 2020 0
Aug 15, 2020

Copy link to clipboard

Copied

Use this as custom format script:

event.value = util.printf("$%,0.2f$",event.value);

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...
Aug 15, 2020 0