[TUT]Custom Profile Fields - Expected Input Format

Status
Not open for further replies.

Lease

Active Member
184
2008
7
0
When entering a custom profile field, you have the option of requiring a specific format for the response.

Expected Input Format
Use: a for alpha characters
Use: n for numerics.
Example, for credit card numbers: nnnn-nnnn-nnnn-nnnn
Example, Date of Birth: nn-nn-nnnn
Leave blank to accept any input

As you can see, a is for alpha characters (a-z) and n is for numbers (1-9)

Example 1

Let's take an example of Date of Birth from above. Filling in nn-nn-nnnn into the Expected Input Format field, the following are acceptable

01-01-1970
12-25-0000
11-12-1955

While the following are NOT acceptable

1-1-70
12-25-00
11/12/1955
1-23-1970

Example 2

Say the custom profile field is "What is your favorite food?". You set the expected input as aaaa

The following are acceptable

teas
plum
ienc
qqqq

The following are NOT acceptable

watermelon
pizza
amp4


Remember that an expected input is NOT required. Leaving the field blank would allow this...

Example 3

Profile Field Question: What's your favorite TV show?

The following are acceptable ..

Heroes
Grey's Anatomy
Meerkat Manor
58hfhfh8erad

Nothing would be unacceptable.



In conclusion, the Expected Input Field can be useful in certain circumstances. Where the data to be entered is NOT a set format with a SET number of characters, it is not recommended for use.

If you are requiring a set format, it is recommended that you include the format in the description of the Custom Profile Field. Assuming the field was date of birth, and required format was nn/nn/nnnn, you'd want to include in the description something like "Must be entered in the format nn/nn/nnnn" so that your users know how to enter it.

An incorrectly formatted response returns the error

"You must complete the form fully before proceeding. Please go back and check the data you entered."

Which is a bit misleading, as it leads a user to believe that they missed filling in a part of the form, rather than the field containing improperly formatted data.
 
Status
Not open for further replies.
Back
Top