Copy link to clipboard
Copied
I am trying to count the number of numbers and add a + symbol to the second to last value in form field
example
user input into field 1000
form format 10+00
user input into field 10000
form format 100+00
user input into field 100000
form format 1000+00
Here's a simple general purpose script for this
event.value = event.value.replace(/(\d\d)$/,"+$1");
If you want to change the actual value of the field, this script should be placed in the validation or "WillCommit" event script.
If you just want to change how the field is displayed to the user, then it should be placed in the Format Script.
Copy link to clipboard
Copied
Here's a simple general purpose script for this
event.value = event.value.replace(/(\d\d)$/,"+$1");
If you want to change the actual value of the field, this script should be placed in the validation or "WillCommit" event script.
If you just want to change how the field is displayed to the user, then it should be placed in the Format Script.