Home › Forum › Behaviors › The Replace Function
Tagged: behaviors, field, Function, replace
This topic contains 2 replies, has 0 voices, and was last updated by jschultz 9 years, 8 months ago.
Has anyone used the Replace function?
I would like to have the Replace function correct certain elements of a field.
for example, if the user enters Road or Street instead of RD or ST the form to change it to the latter.
I am testing out a form with one field and a button that calls the replace function. What I have (see below) doesn’t work. Any ideas?
Well actually it works but it adds RD to “road” once I corrected the fields. I do not know what to put in for pattern.
Assuming that ‘field1’ is the text field that includes the embedded Road text string, this looks OK to replace only the first occurrence. If there might there be more than one occurrence of the word, include “g” in your flags.
You must be logged in to reply to this topic.