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

How Can i Add Naira Currency Symbol in my Adobe Form

Explorer ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

Hello all, please I need someone to assist me in looking at the following currency script for Naira, I have searched and tried several approaches but don’t know why am not getting the right result in my form, the following is the script I picked from Thom_Parker's post on the same topic, from the following link: https://acrobatusers.com/tutorials/formatting_text_fields/but it still did not work on my form.

 

event.value = String.fromCharCode(0x0A3) + event.value;

 

which by the above script description the following should give me the Naira currency symbol i need:

 

event.value = String.fromCharCode(0x20A6) + event.value; 

 

but instead, i get a bullet circle symbol on the field. i have used three different font type: "Open Sans", "Helvetica", and "Arial" but none of them gave me the sign, i have equally worked another clean page with a singular form field, yet i got the same result.

 

The following picture is how my currency symbol should look like this:

Naira.JPG

Please i will appreciate any support in this direction. Thanks!

TOPICS
Acrobat SDK and JavaScript

Views

3.0K

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 1 Correct answer

Community Expert , Mar 06, 2020 Mar 06, 2020

Use this code:

 

if (event.value) event.value = "\u20A6" + util.printf("%,0.2f", event.value);

Votes

Translate

Translate
Community Expert ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

Use the Unicode value, like this:

 

event.value = "\u20A6" + event.value;

Votes

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 ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

Thank you so much try67, am very grateful for your response, but i have entered this script and it is still not giving me the symbol, instead i get a bullet circle sign like the picture below: 

 

Naira on Total.JPG

 

this is exactly how i entered the script in the custom format page below:

 

Script.JPG

custom currency script.JPG

please is there anything I am not doing right here?

 

i have equally used this:

event.value = String.fromCharCode(0x20A6) + event.value;

but still it didn't work.

Votes

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
Community Expert ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

For the field use a font like Arial.

Votes

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 ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

Hi, Bernd_Alheit, i have equally tried Arial, it still didn't work.

Votes

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
Community Expert ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

Then the font you're using doesn't support unicode properly. I tried it with Helvetica and it worked fine:

 

Snap2.png

Votes

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 ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

Thank you so much Bernd_Alheit and try67, i so much appreciate all the responses, but could there be something i am mixing up here, because its still not working, i have just tried the same thing on a clean page, it still turned out the same bullet sign, here is my attachment of entire property page of what i did and the main adobe page itself:

 

1 full_page.JPG2 General_Tab.JPG3 Appearance_Tab.JPG4 Options_Tab.JPG5 Action_Tab.JPG6 Format_Tab.JPG7 Validate_Tab.JPG8 Calculate_Tab.JPG

 

please i still need your assistance on getting this done, thank you so much for your kind responses. 

Votes

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
Community Expert ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

It works with font Arial:

Bild1.jpg

Votes

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 ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

Thank you so much Bernd_Alheit, but here is my screen and what i did:

For_Arial.JPG

 

And for the custom script here is Format page:

 

Format_Page.JPG

 

could there be something i am missing here, i have done everything i have learned from everyone. 

Votes

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 ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

Thank you so much Bernd_Alheit, and try67, it has now worked, I used Tahoma font-type and it worked, but there is one more thing here, please how can I introduce separator to the figures, instead of straight digits as it is now, I will like it to read as amount with commas, like N10,000.00 instead of N10000, please I need help to fix that. Thank you so much.

 

Separator.JPG

Votes

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
Community Expert ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

Use this code:

 

if (event.value) event.value = "\u20A6" + util.printf("%,0.2f", event.value);

Votes

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 ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

LATEST

Excellent, it worked perfectly, thank you so much try67, i am very grateful for all your support in this, thanks a lot.

Votes

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