Mapping Data To the Quik! Forms Engine
Every form in the Quik! library is built with a standard definition called the Quik! Field Definition. This structured approach to form field design allows for consistent and reliably naming conventions across all forms. For example, the first name of a contact will always be the same field name for first name regardless of role (e.g. owner, beneficiary, minor, doctor, etc.) and will function the same on every form built with that naming convention. Please see the Quik! Field Definition Reference Guide for more details on field names you can use with Quik!.
NOTE: For existing customers, Quik! previously allowed multiple ways of mapping fields. To simplify this, and based on actual customer implementations, the new approach is to only use the full Quik! Field Name (not the System Name) and the corresponding value to fill.
How To View Field Names On A Form
To find out what a specific field name is on a form, there are two ways to do it.
- Generate the form and look at the HTML page source.
- Generate the form with the TestDataMode set to TRUE.
Page Source
Any software programmer should be able to view the page source of an HTML file within their development environment or directly within a web browser (right-click and choose Page Source). The page source will show each field on the form page and the "Name" field contains the field's name.
For TestDataMode, see the "How To Test Forms" section of this document.
How To Pre-Fill Fields
The majority of fields on a given form are either text boxes (allowing the user to enter a string or numeric value) or a check box (allowing a user to place a check mark in the field). There can also be buttons, signatures, list boxes, drop-down boxes and radio buttons. When pre-filling fields, the methodology is the same across all fields, except for buttons and signatures which cannot be pre-filled with data.
Adding a Field Value
The method for prefilling form fields is the "AddFieldToForm" method. This method accepts various parameters including the field name, field value and settings for read-only, visibility and required.
For example, to add the Owner 1 first name:
objQFE.AddFieldToForm( _
FieldName:="1own.FName", _
FieldValue:="Jonathan", _
FieldReadOnly:=QuikFormsEngine.QFD.FieldReadOnly.NoRestrictions, _
FieldVisibility:=QuikFormsEngine.QFD.FieldVisibility.None, _
FieldRequired:=QuikFormsEngine.QFD.FieldRequired.NotRequired, _
FieldFormat:="", _
FieldMaskFlag:=False, _
FieldCalcOverride:=False)
Use A Translation Table
Field mapping is best accomplished in a translation table that relates Quik!'s base field name (e.g. "FName", "DOB", "H.Addr1", etc.) from Quik! with your corresponding field (e.g. "FirstName" or "F_Name") as it exists in your data source. Then to output the values to Quik! and prefill the form, query the translation table and prepend the Quik! parent field (e.g. "1own" for owner 1, or "2ben" for beneficiary number 2, etc.) to the field name (e.g. 1own.FName) and loop through the records and populate the Quik! Forms Engine using the AddFieldToForm method and the corresponding properties.
Text Boxes, List Boxes, Drop-Down Fields
To populate a given field, you need to input the value for the field in the value property for the given field you wish to populate. For example, to populate the primary account owner's first name, set the value property for Owner1's First Name attribute (e.g. QFE.Owner1.FirstName.Value = "Tom") and the value will appear in the field.
Check Boxes and Radio Buttons
Pre-filling a check box or radio button, or having the check box or radio button appear pre-checked, is a little more difficult than populating a text box. In order for a check box (or radio button) to be checked, you must set the value property equal to the value that the check box exports when checked. In other words, a check box is built on the Quik! Forms with a specific output value and if you want to pre-check the box, you must provide the export value to the field in order for the form to check the exact field you want checked.
There are two ways to determine the export value of a check box:
- The value is pre-defined in the Quik! Field Definition
- The value is not pre-defined and the value is determined by the order of the check boxes
For a full list of pre-defined values, please see the Quik! Field Definition Reference Guide.
For fields that do not have pre-defined values, you will need to review the form and determine the order of the check boxes on the form. Check boxes that are not defined are given numeric export values that start with 1 and count by one until the last check box is reached – counting is performed from left to right, top to bottom.
For example, if the form is asking for the client net worth and the form shows a range of values like below, then the export value for the $0 to $50,000 check box will be "1", "2" for $50,001 to $100,000, "3" for $100,001 to $250,000, etc. If you wish to check the second check box, set the networth value equal to "2" (e.g. 1own.NetWorth.Range = "2").
□ $0 to $50,000
□ $50,001 to $100,000
□ $100,001 to $250,000
□ $250,001 to $500,000
□ Over $500,000
Setting Field Properties
Several field attributes can be set when adding the field to the form. These attributes include:
- Field Name (required)
- Field Value
- Read Only (default is not read only)
- Visibility (default is visible)
- Required (default is not required)
- Format
- Mask
- Calculation Override (default is false)
- Hidden (default is false)
For example, if you wish to pre-fill a field and then NOT allow a user to change the value, set the field to read-only. Or to add a hidden field on the form set the Hidden attribute to TRUE and the field will not display to the user but the value will be passed in any POST events (e.g. print, sign, submit, etc.).
objQFE.AddFieldToForm( _
FieldName:="1own.H.Phone", _
FieldValue:="3105554444", _
FieldReadOnly:=QuikFormsEngine.QFD.FieldReadOnly.NoRestrictions, _
FieldVisibility:=QuikFormsEngine.QFD.FieldVisibility.None, _
FieldRequired:=QuikFormsEngine.QFD.FieldRequired.NotRequired, _
FieldFormat:="(###) ###-####", _
FieldMaskFlag:=False, _
FieldCalcOverride:=False,
HiddenField:=False)
How To Pass Hidden Data
If you want to pass data from your system to your form and back to your system (i.e. a transaction identifier) then use a Hidden field on the form. Simply add any field with the Hidden parameter set to TRUE. You can name the field anything unique (e.g. "MyUNID", "UniqueTransactionID", etc.) – we recommend not using a name similar to the Quik! Field Definition in order to ensure your field is unique.