Wednesday, November 24, 2010

Adding a textbox mask to your feedback form

Sometimes you need a special textbox in your form, which can only collect a certain kind of data (such as date or time). This kind of element does not exist as a basic
element in the form builder, but it can be created.

If, for instance, the you wish to collect date and time data in your feedback form, but in a different format than the one used by default he can do so by simply using this option. All you need to do is use a regular textbox and define a mask of
dd/mm/yyyy-HH:MM.

This option may also be applied on collection of alphanumeric codes and numbers (examples below).
examples of masks:
Date - dd/mm/yyyy
Time - HH:MM:SS
A code - x-nnnnn
A phone number - nn-nnnnnn

Mask Format:
In order to use the mask you need to use characters and delimiters as follows:
x- character for collecting alpha numeric data (using only lower case letters)
n- character for collecting only numeric data (using only lower case letters)
yyyy – character (made out of 4 chars) for collecting year data (using only lower case letters)
mm– character (made out of 2 chars) for collecting month data (using only lower case letters)
dd- character (made out of 2 chars) for collecting day data (using only lower case letters)
HH- character (made out of 2 chars) for collecting hour data (using only capital letters)
MM- character (made out of 2 chars) for collecting minute data (using only capital letters)
SS- character (made out of 2 chars) for collecting second data (using only capital letters)

Take Note!
Characters may only be used in the format specified above (for example the year character
may only be entered in 4 lower case letters: yyyy).
Only the x and n characters may consist of one or more chars (n or nn or nnn or nnnnnn etc).

Delimiters:
/ - used as a delimiter. For example: the date dd/mm/yyyy (27/11/2009)
: - used as a delimiter. For example: the time HH:MM:SS (12:32:45)
- used as a delimiter. For example: a phone number nn-nnnnnn (09-8871634 or 04-6543378)

How to Create a Mask
Steps to create a mask:
1- Drag a textbox element (in the form builder).
2- Go to the textbox's settings on the right.
3- Fill in the desired mask format.
Mask
4- Turn on the "mandatory" checkbox.
5- Press on "apply".
6- Save the form.

No comments:

Post a Comment