Step 1: Check us out

You don't have to be a member to look at any content on the site. Increase your expertise with our helpful tutorials, videos, forums, and sample PDFs.

Step 2: Sign up for a free account

Like what you see? Take the next step and become a member. Register now to get discounts, attend eSeminars, ask questions and more.

Step 3: Start participating

Get the most out of your membership. Post in the forums, create your profile, submit to the gallery, attend a user group meeting. Log In now.

Acrobat User Community Forums

You are not logged in.     Log in to your AUC account.     Don't have an account? Sign up today

#1 2009-12-04 15:25:58

CrayZme
Member
Registered: 2009-12-04
Posts: 13

Convet Numbers into Words

ANSWERED

I have a form with a field that the user enters in a numeric quantity (Text1) I want to have a script convert that data from text1 into words in text2.

How can I accomplish this?

All your help is greatly appreciated as I am a Javascript  / Acrobat Virgin just starting to learn how all these comands work.

Thanks!!

- Tom


My Product Information:
Acrobat Pro 8.1 / Windows

Offline

 

#2 2009-12-04 15:33:25

gkaiseril
Expert

From: Chicago, IL US
Registered: 2006-02-24
Posts: 3075

Re: Convet Numbers into Words

LiveCycle Designer has a 'Num2Word' function.

For AcroForms Adobe provided a PDF check form with a 'numtowords' function, see Number to Text.

Offline

 

#3 2009-12-04 15:46:22

CrayZme
Member
Registered: 2009-12-04
Posts: 13

Re: Convet Numbers into Words

Thank you for the response!!!! But I need more help (a 2x4 to the forehead might work for me)

For some odd reason my software vendor told us we can not use lifecyle to create our forms due to incompatability reasons...

I pasted the large script from the link you gave me into :

Advanced / Document Processing/Document Javascripts/ ConvertToWords

I then pasted the short script:

var nValue = this.getField("Text6").value;
event.value = ConvertToWords(nValue);

Into the field I want the words to appear  (Text6 is where the numbers are inputted to)

I get nothing...  what I am I doing wrong?

Offline

 

#4 2009-12-04 16:05:36

gkaiseril
Expert

From: Chicago, IL US
Registered: 2006-02-24
Posts: 3075

Re: Convet Numbers into Words

Your consultant should have fully explained what he/she meant. If you have users with Reader or Acrobat before 5.1 there are all sorts of issues. Acrobat 9 is buggy and has many issues with LiveCycle Designer forms.

I just tried it and it works for me with Acrobat 8. This is basically the code from the version 4.0 example provided by Adobe.

Make sure you deleted the Acrobat 'assumed'  function definition, you should only have the provided code as the function and you copied the entire code for the functions, there is a series of variables outside of the functions and there are 2 functions that need to be copied. You also have to have the Acrobat preferences set to allow the running of JavaScript.

Do you get any error messages in the JavaScript console?

Last edited by gkaiseril (2009-12-04 16:07:38)

Offline

 

#5 2009-12-04 16:51:15

CrayZme
Member
Registered: 2009-12-04
Posts: 13

Re: Convet Numbers into Words

I have gotten it to work!!!!!     The only issue is  that You enter the numbers into TEXT6 and then The words wont auto populate into TEXT7 unless you put a character in it.  But I can live with it unless you have a fix suggestion...

Thank you SO MUCH!!!!!!

Offline

 

#6 2009-12-04 17:26:36

gkaiseril
Expert

From: Chicago, IL US
Registered: 2006-02-24
Posts: 3075

Re: Convet Numbers into Words

Are you using the 'custom calculation'?

Offline

 

#7 2009-12-04 17:30:05

CrayZme
Member
Registered: 2009-12-04
Posts: 13

Re: Convet Numbers into Words

ACCEPTED ANSWER

aHHH  That worked!   I had the script only under custom keystroke,  now I have it in both spots and it wrks perfect!

You have just made many many people very happy!!!!!   Thankyu so much!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson