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

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

Explorer ,
Aug 02, 2022 Aug 02, 2022

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
How to , JavaScript , PDF forms
3.0K
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
2 ACCEPTED SOLUTIONS
Community Expert ,
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.

View solution in original post

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 ,
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

 

View solution in original post

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 ,
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.

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

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

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 ,
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

 

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

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?

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

forgot the screenshot 🙂

acrobat.png

 

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

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

acrobat star.png

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

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

 

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 ,
Aug 02, 2022 Aug 02, 2022
LATEST

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

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