HomeGuidesRecipesAPI
HomeGuidesAPILog In

Input Field

Field questions are the cornerstone of data gathering forms; they allow end users to input custom answers, contact details and more.

Usage

To transfer the enters data around the form and control the appearance of contextual elements the use of reference tags and conditions is likely to be of particular interest to designers that require field questions.

📘

The default time format is 24 hour time (HH:mm)

Standard date formats can be applied to the Time type Text Field at the answer level.

Question properties

PropertyDescription
Question TextThe title of the question
Text PositionThe position in which to display the Question Text on the form. The options are: Top Left Floating (None)
MandatoryChecking this box will make the question mandatory. It is unchecked by default.
Default ValueSets a default value for the Text Field when it appears in Produce. Default values can contain: Any text including numbers or dates. A named date such as ‘tomorrow’. References to other questions.
Data TypeSet the data type to one of the following: Text Date Number Email Validation Type Description
CompareCompares a user’s response to a value, calculation or a preceding question. For example, the compare feature could be used to ensure that: an applicant is over a certain age a price is between $0.00 and $1,000.00 a delivery date is no more than 10 days after the purchase date a parent was born before their children an order number begins with ‘ORD00’
Character LimitField length validation limits the question response to a minimum and/or a maximum number of characters in length. This can be used to ensure a name is less than 50 characters long, or a code is exactly four characters.
Regular ExpressionInfiniti supports regular expression matches for complex data validation. For example, to ensure an email address is in the correct form complete with @ symbol.
Width (Pixels)This will set the maximum number of pixels wide the field will be.
Text RowsThe number of rows that are displayed to the end user in Produce. By default, only one row is displayed.
WatermarkA watermark displays a placeholder value of an HTML input textbox until the user has provided some valid text. Watermarks are not the same as default values as they are used purely for informative/example purposes and don't count as a repose to the question. i.e. If no input is made to a text field displaying a watermark, the actual field content is considered to be blank. If those cases where the text field has a default value, then the watermark will not be displayed unless the user deletes the current text. Note: IE does not show the watermark when the textbox has focus, other browsers do. IE8 and 9 do not support this feature natively but it is simulated through JavaScript.
Input Mask TypeSee below section on input masking
Display MaskingSee below section on input masking
Help TextHelp text can be added to give additional information about what is being requested in the question. This is a rich-text box.
CommentsCheck this box to allow comments. It is unchecked by default.
StyleThe options are: Alert (error) Alert (info) Alert (success) Alert (warning) Jumbotron Label (default) Label (error) Label (info) Label (primary) Label (success) Label (warning) Well

🚧

Questions with the data type set to 'Date' will return the date formatted in the long date format.

To change this defult behaviour the use of a format string such as SHORT DATE, LONG DATE, dd/MM/yyyy must be used.


Input Masking

Inputs field questions have masking settings, in the question properties, that can be applied to them that ensure users enter the correct information before submission. Display masking to hide the input of sensitive information is also available.

Custom input masking patterns can also be set in the pattern input box. Click on the i icon for more information.
The built-in masks (alphabetically sorted left to right) -

Australian Medicare NumberAustralian Tax File Number (TFN)
Austria Sector-Specific Personal Identifier (ssPIN)Austria Social Insurance Number (ASVG)
Canadian Social Insurance Number (SIN)Germany Insurance Number (VSNR/RVNR)
Germany Personal Identification Number (PK)International Bank Account Number (IBAN)
New Zealand Inland Revenue Department (IRD) NumberSingapore National Registration Identity Card (NRIC)
Swiss Social Security Number (OASI / AVS 2008)UK National Health Service (NHS) Number
UK National Insurance Number (NINO)US Employer Identification Number (EIN)
US Social Security Number (SSN)

Field Validation

To ensure the quality of user input, SmartIQ enables you to apply validation rules to Text Field questions. If the end user enters an invalid response to the question, SmartIQ will display an error message.

Usually the field question will automatically have some validation based on the selected field type. However, to set up custom validation, navigate to the Validation tab in the inspector panel.

Validation TypeDescription
CompareCompares a user’s response to a value, calculation or a preceding question. If the referenced question isn't a preceding one the validation will not work as intended.
Field LengthField length validation limits the question response to a minimum and/or a maximum number of characters in length. This can be used to ensure a name is less than 50 characters long, or a code is exactly four characters.
Regular ExpressionSmartIQ supports regular expression matches for complex data validation.

🚧

dates as expressions must begin and end with ‘#’ or they will be processed as a calculation with the ‘/’ being used as a division symbol

📘

The Message property can include question references to build messages dynamically, e.g. '[q2] is an invalid date'

Enter a meaningful error in the Message property otherwise a default message will be displayed. An error message such as ‘Value must be between 1 and 100’ is much better than ‘Invalid value’.