Using FormCalc to automatically replace text in a text field? | Community
Skip to main content
May 18, 2006

Using FormCalc to automatically replace text in a text field?

  • May 18, 2006
  • 1 reply
  • 3551 views
Hi,



I'm trying to use FormCalc to automatically look for a string and replace it in a text field. I'm trying to do this by setting the script of the "Change" event in the text field to this:



$=Replace($, "address__", "123 Fake Street\u000aAnycity, NT 12345")



So thus, when a user types "address__" into the text field, it replaces the string "address__" with the actual address. I would create one line of code for each different address that I wanted to use.



What am I doing wrong, syntax-wise? I don't get any script errors, it just doesn't do anything.



I know very little about using FormCalc - are there any good tutorials out there on the internet? Most LiveCycle Designer documentation seems to be geared towards JavaScript users, but FormCalc seems fine for my needs.



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

1 reply

New Participant
May 18, 2006
Script works good if you can use in 'exit' event. Also it is good to use $.rawValue = Replace($.rawValue, "address__", "123 Fake Street\u000aAnycity, NT 12345")



Good Luck,

SekharN

www.lawson.com