I have created a form in which a text field requires the user to enter detailed documentation. In doing so, the user tends to use a comma within the description. As the data within the form is extracted to Excel I can not allow commas. Can anyone tell me what java script would be needed to resolve this issue or if it is possible? I am also open to other suggestions such as knowing how to make the forms extract as pipe delimited vs comma delimited.
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
I'm not sure about the import into Excel with commas in the text, fixing that sounds like it would be the best solution. But to stop someone from entering a comma character add the following JavaScript into the change event of the text field;
xfa.event.change = xfa.event.change.replace(/,/g,"");
This uses a RegEx (the bit between the "/" characters) to replace all occurances (because of the "g") with an empty string (the second parameter to the replace method).
Regards
Bruce
Views
Replies
Total Likes
Hi,
I'm not sure about the import into Excel with commas in the text, fixing that sounds like it would be the best solution. But to stop someone from entering a comma character add the following JavaScript into the change event of the text field;
xfa.event.change = xfa.event.change.replace(/,/g,"");
This uses a RegEx (the bit between the "/" characters) to replace all occurances (because of the "g") with an empty string (the second parameter to the replace method).
Regards
Bruce
Views
Replies
Total Likes
Thank you! Works as expected.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies