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 |

Comments

  1. By Anonymous

    Reply

  2. By Deepa

    Reply

  3. By Deepa

    Reply

Leave a Reply

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

*