Popular Formats
Here is the list of popular formats that you can design using regular expressions.
Format | Character Limit | Field Width | Regular Expressions | Examples |
---|---|---|---|---|
DATE | Between 0 and 10, this will allow for 10 (0-9) symbols to be entered (2 for month, 2 for day, and 4 for year. You will notice that it only adds up to 8 digits, the extra 2 is for the forward slashes that separate the month, day, and year). | 10 characters (2 for month, 2 for day, 4 for year, and 2 for the forward slashes). | \d{2}\/\d{2}\/\d{4} \d{2} and \d{4} refers to the sequence of two and 4 digits respectively (numbers 0 to 9). \/ stands for forward slash, \ is used to interpret / as a forward slash. More precise: | mm/dd/yyyy |
Phone Number | Between 0 and 12, this will allow for 12 symbols to be entered. | 12 characters (3 for area code, 3 for prefix, 4 for line number). | \d{3}-\d{3}-\d{4} \d{3} and \d{4} refers to the sequence of three and four digits respectively (numbers 0 to 9), - stands for a dash. | 000-000-0000 |
Zipcode | Between 0 and 5, this will allow for 5 digits to be entered. (there are 5 digits in a zip code). | 5 characters. | \d{5} \d{5} refers to the sequence of five digits. | 02135 |
To use the Email format, go to the survey Questions page and select the New Question option from the Insert dropdown menu then:
Choose the Single line text with pre-format options question type from the Please select a question type dropdown box.
Input your question text into the Write your question below text box.
Input answer choices using the Write label for each line option.
Select the Format answers option to select from the available formats.
Next to the first answer choice select the Email format.
Now you have a field formatted for a user to enter in an email address.
Make sure that you click the Save button to save your newly created question.
As a simple and fast workaround for creating date format we recommend using Calendar plugin. This plugin adds visual calendar for selecting dates to your survey. For more details consult the Pluginshelp chapter.
The regular expression itself does not limit the quantity of symbols to be entered. It only creates the format for the certain pattern. To limit the quantity of symbols, use the Character Limit option, shown in the table above.