Contact me if you need to build a complex form with complex functions by using Caldera Forms (Create new user, send SMS to user, email validation, delete user, delete post...)In this tutorial, I will demonstrate some Masked Input Type for Caldera Forms.

Single Line Text Field Introduction

Single Line Text is the most common field in Caldera Forms. This field comes with many input types:

Text – The default field type, accepts all characters.
Date – Accepts ‘yyyy-mm-dd’ format. E.g: 02-Jun-2019
Month – Accepts ‘month name and year (M Y)’. E.g: December 2019
Number – Accepts numbers only. E.g: 092123
Search – Sets the field type to be used for searching strings and numbers.
Tel – Accepts numbers only.
Time – Accepts ‘hh:mm AM/PM’ with 12 hour formatting. E.g: 12:23 PM
URL – Accepts only valid URLs such as www.calderaforms.com.
Week – Accepts ‘week number and year’. E.g: Week 23, 2019

Mask Input In Caldera Forms

Mask Input extends power of Single Line Text Field by adding condition for user’s input using wildcard character. To enable this feature, you must tick Enable input mask and fill in Mask rule, e.g (aaa-99-999-a9-9*). Here are list of rules:

  • 9 : numeric
  • a : alphabetical
  • * : alphanumeric
  • [9 | a | *] : optional
  • {int | * | +} : length

I made underneath form to show some examples:

You can input any character, any length. Rule = [a{*}]
You can input any number, any length. Rule = [9{*}]
You can enter number only, limit 6 numbers. Rule = [9{6}]
You can input Email only. Rule = *{+}@*{2,}.*{2,}[.[a{2,}][.[a{2,}]]]

As you can see by the email mask input, you are able to combine multiple mask inputs into one.

Credit:

GiangLe.DEV

My name is Giang, a Vietnamese guy living in Thanh Hoa City, Vietnam. I am a WordPress Developer, learning to master WordPress and Laravel PHP Framework.

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu