Page 1 of 1

Replace curly quotes and other problematic characters?

Posted: Fri Apr 10, 2015 2:58 pm
by mlgeek
I guess I'm looking for the best way to scrub strings users have entered into fields before they get saved to the database.

Best to do this with Custom Code > Javascript? With Custom Code > Before Save?

How would one go about doing this?

Re: Replace curly quotes and other problematic characters?

Posted: Mon Apr 13, 2015 7:39 am
by admin
mlgeek,

Object Event (Javascript onchange event)

eg.

http://stackoverflow.com/questions/3889 ... phanumeric

Steven

Re: Replace curly quotes and other problematic characters?

Posted: Mon Apr 13, 2015 3:26 pm
by mlgeek
Hi Steven-


Are we talking about entering the JavaScript into the "On Change" box for field I wish to scrub?
Image

If so...do I just enter my JavaScript with regex here?

Re: Replace curly quotes and other problematic characters?

Posted: Tue Apr 14, 2015 1:20 am
by admin
Yes but this is a nuBuilder 2 question in the nuBuilderPro section.

Steven

Re: Replace curly quotes and other problematic characters?

Posted: Tue Apr 14, 2015 3:13 pm
by mlgeek
Ack. My apologies, Steven.

Re: Replace curly quotes and other problematic characters?

Posted: Thu Apr 16, 2015 6:05 am
by admin
.