dreamydesigner Posted March 31, 2008 Report Share Posted March 31, 2008 I need to make sure that special characters cannot be entered into my caspio forms. Does anyone know how to set this? Quote Link to comment Share on other sites More sharing options...
0 davep Posted April 8, 2008 Report Share Posted April 8, 2008 You can specify fields as EMAIL and ensure no invalid character is entered. Aside from that if you want to prevent certain characters from your text fields and text area fields you would need a JavaScript code to do that. Quote Link to comment Share on other sites More sharing options...
0 autonumber Posted November 29, 2021 Report Share Posted November 29, 2021 Hi!! Just to update this post, It appears Caspio already has a HowTo Documentation for removing special characters from input fields. Here is the link: https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/remove-special-characters-for-input-fields/ I hope this helps!! Quote Link to comment Share on other sites More sharing options...
0 cheonsa Posted February 15, 2022 Report Share Posted February 15, 2022 Hi! Just wanted to share my solution with you. If you would like to have an alert, you can use this script in the Footer of the DataPage: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function () { event.preventDefault(); var username = document.getElementById("InsertRecordFIELDNAME").value; var inputRGEX = /^[a-zA-Z0-9 ]*$/; var inputResult = inputRGEX.test(username); if(!(inputResult)) { alert("Please only use standard alphanumerics"); } else { document.forms["caspioform"].submit(); } }); </script> Please note to replace the FIELDNAME in the JavaScript with name of the field. Quote Link to comment Share on other sites More sharing options...
0 Meekeee Posted February 25, 2022 Report Share Posted February 25, 2022 You may also try this: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function (e) { var username = document.getElementById("InsertRecordFIELDNAME").value; var inputRGEX = /^[a-zA-Z0-9 ]*$/; var inputResult = inputRGEX.test(username); if(!(inputResult)) { e.preventDefault(); alert("Please only use standard alphanumerics"); } }); </script> Quote Link to comment Share on other sites More sharing options...
0 futurist Posted June 1, 2022 Report Share Posted June 1, 2022 Hi @dreamydesigner, You may refer to this: Quote Link to comment Share on other sites More sharing options...
Question
dreamydesigner
I need to make sure that special characters cannot be entered into my caspio forms. Does anyone know how to set this?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.