Adobe forms currency field: Use EUR/USD instead of €/$

Explorer ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Hi everybody,

I'm working on a new Adobe form where I have many currency fields. In the currency selection box only the symbols for EU and US currency can be selected, but I'd prefer to use EUR and USD instead of the symbols. Is this possible somehow?

 

Appreciate any info! Thanks!

TOPICS
Comment review and collaborate PDF , How to , JavaScript , PDF forms

Views

66

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
community guidelines

correct answers 2 Correct answers

Adobe Community Professional , Aug 02, 2022 Aug 02, 2022

It's possible with a custom Format script.

The most basic one would be (for example):

 

if (event.value) event.value += " EUR";

 

However, this will prevent you from using the Number option, so the user will be able to enter things might not be valid to the field. You can prevent that using a Validation script, or writing your own Keystroke and/or a more complex Format script.

Likes

Translate

Translate
Adobe Community Professional , Aug 02, 2022 Aug 02, 2022

Then you can use the code I provided. It should go under the Format tab, then select Custom, and put it under Custom Format Script:

 

try67_0-1659428947892.png

 

Likes

Translate

Translate
Adobe Community Professional ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

It's possible with a custom Format script.

The most basic one would be (for example):

 

if (event.value) event.value += " EUR";

 

However, this will prevent you from using the Number option, so the user will be able to enter things might not be valid to the field. You can prevent that using a Validation script, or writing your own Keystroke and/or a more complex 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
community guidelines
Explorer ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Thanks for the quick response! In my form there's no number input for the user. The user just selects some options and the values will be calculated in a new text field. For this text field I'd like to use EUR. Right now I'm using a simple calculation (last tab in preferences - my Acrobat is in German, so I don't know how these fields are named in English version) but I could also use a javascript. Only how do I have to combine it with your above script?

 

For example one simple calculation is: (bp + pd + op) * 0.15

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
community guidelines
Adobe Community Professional ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Then you can use the code I provided. It should go under the Format tab, then select Custom, and put it under Custom Format Script:

 

try67_0-1659428947892.png

 

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
community guidelines
Explorer ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Thanks, have the EUR there now. Only problem is (as you can see on the screenshot) that I need to have it aligned right with EUR after the numbers. When I have it aligned left, it's correct, but aligned right, it goes before the numbers. Do you also have an idea for that issue?

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
community guidelines
Explorer ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

forgot the screenshot 🙂

acrobat.png

 

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
community guidelines
Explorer ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Also when I want to put a star after EUR, it goes on the left side, instead of right. Very weird!

acrobat star.png

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
community guidelines
Adobe Community Professional ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Works fine for me... I think you're setting the Direction property, instead of the Alignment one.

Direction "Right to Left" is for RTL languages (like Hebrew or Arabic), not for aligning the text to the right.

To do that go to the Options tab and change the Alignment option to "Right", and then it will work correctly:

 

try67_0-1659441360780.png

 

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
community guidelines
Explorer ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

LATEST

Yes yes yes, thanks a lot! You saved my day!! 

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
community guidelines