How to convert numbers to text in a form created in LiveCycle Designer? | Community
Skip to main content
New Participant
June 17, 2009
Solved

How to convert numbers to text in a form created in LiveCycle Designer?

  • June 17, 2009
  • 12 replies
  • 17034 views

I am relatively new to Livecycle Designer and very much a newbie with JavaScript and FormCalc.  I have created a Conditional Sales Contract form and when the user enters a dollar amount (1548.95) I would like to know how to  auto fill a text field with its text equivalent ( One Thousand Five Hunderd and Fourty-eight dollars and ninety-five cents).  I have found two forums explaining how to do this in Acrobat 8 but nothing in LiveCyle Designer.   Can this be done in LiveCycle and can anyone please help me with the script?

thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by _Bruce_Robertson

Hi Peter,

You could move the WordNum function to the calculate event of the text field (might be a better place for it anyway).

So you would have something like;

WordNum(NumericField2

, 2)

Bruce

----- form1.#subform[1].DollarAmountText::calculate: - (FormCalc, client) ------------------------------

12 replies

New Participant
June 18, 2009

Thanks for the help, I can see how that FormCalc script works on exiting a field where the dollor number has been entered but what do I need to add to it in a field where the amount has been simply carried forward from a calculated field.  Currently in this number field is:

----- form1.#subform[1].DollarAmount::calculate: - (FormCalc, client) ------------------------------

NumericField1[8]

_Bruce_Robertson
New Participant
June 18, 2009

FormCalc has a WordNum function that will do this.  So maybe on the exit event of the dollar amount field you could have;

DollarAmountText

= WordNum($ , 2)

Where DollarAmountText is the field to show the text equivalent. "$" is FormCalc's way of referring to the current field and "2" means monetary value with cents.