Zoho Creator Tutorial – Remove Special Characters from String (Validation)

What is Zoho Creator | The Basics| Design & Share Custom Forms |Using prevalidated Form Fields | Statless Forms | Unique values in List | HTML views |
We all know that Telephone / Zip codes are NUMBERS isnt it (Genius eh!). But, when we typically use the Number-field type in the Zoho form, the end user tends to enter something like this

But, as the Form Field is of Number type, the system fails to recognize the special characters ( parenthesis (), – hyphen etc) and understands the value to be Null
ie, According to the system, an number field which does not exclusively contain numerals are invalid — Well, thats how its supposed to be isnt it?. okay, the what happens with INVALID DATA ? .. ofcourse it gets rejected ( Again, a No Brainer.. isnt it?)
Well then, how to make sure irrespective of whatever format the user enters, the data gets added on to the system in the right format? For this, we can use a combination of field types & Custom Actions.
SCENARIO :- ALLOW USER TO ENTER THE TELEPHONE NUMBER IN WHATEVER FORMAT HE WISHES TO ENTER
GOAL :- CONVERT THE ENTERED TEXT INTO AN ALL NUMERALS ONLY FORMAT
Demo Here

Lets design the Form ( 2.jpeg)


Lets write a custom action to get this going

Now, lets call this function inside the form
For me, this is the sequence

Once, this is done,
Go to the Live Mode & Validate
Your appreciation is my motivation
What is Zoho Creator | The Basics| Design & Share Custom Forms |Using prevalidated Form Fields | Statless Forms | Unique values in List | HTML views |

3 Replies to “Zoho Creator Tutorial – Remove Special Characters from String (Validation)”

  1. hi Anon,
    Glad you approve of the usefulness of the function.
    Numbers are character strings or not, Numerical input validation was a back breaking exercise during my nascent days.

    Thanks for dropping by 🙂
    Regards

  2. @Anony, who has been diligently visiting this blog atleast 3 times a day

    Lack of activity does not mean, lack of moderation.

    Every comment is manually verified before publishing, so if you are going to continue your "job" of spamming with cheap advts, please leave, seek audience who would be intrested.

    I have better things to do.
    Blog Admin.

Leave a Reply

Your email address will not be published. Required fields are marked *