/
How Do I Add Dropdown Lists to a Form?
How Do I Add Dropdown Lists to a Form?
There are 2 main ways dropdown lists can be added to a form. This article will cover the implementation of both options.
Option 1
Adding a Dropdown list via Code
See the SetFieldTypeByFieldName method page. Sample code below:
VB Sample Code - SetFieldTypeByFieldName
Dim strStates As New List(Of String)() strStates.Add("AK") strStates.Add("AL") strStates.Add("AZ") strStates.Add("CA") strStates.Add("DE") objQFE.SetFieldTypeByFieldName("H.State", QuikFormsEngine.FieldType.DropDownList(New List(Of String)(strStates)))
Option 2
Adding a Dropdown list via Form Rules Manager
- The first step is to log into your account via QCC - Quik! Customer Central
- Then click the product, "Quik! Forms Enterprise"
- This will launch the Enterprise Manager
- The work to implement the rule(s) will all come through the fourth option '4 - Field Rules',
- Clicking that fourth option will open the Field Rules Manager
- Scroll down to the Add New Field Rules section
- Within this area, select the 'By Full Field Name' option and select the 'DropDownList' Attribute Type
- Add in the Full Field Name and enter the values (separated by commas) which will be displayed into the drop down list on the form
- Note: These values will be displayed in descending order. i.e. - Entering 10,9,8,7,6,5,4,3,2,1 will correctly populate a dropdown list counting towards 10 starting with 1
- After finishing configuration of the rule, click the 'Add Rule' button. This will display your rule in a new table below.
- The last step is to apply by form or to apply the rule globally
- Applying the new rule to no specific form will add it globally and appear on all fields and in all forms in your library
- Applying to a specific form will do exactly that. This means you may need to duplicate this rule if you need it to apply to any additional forms.
- Once done click the 'Add Rules' button to add your new drop down list button to your form
How To Pre-fill Custom Dropdown Lists
A custom dropdown list in the Quik! viewer works like most other dropdown lists. To prefill the value in your custom dropdown list pass the exact value in the list that you want selected.
For example,
- Numbers: if your dropdown list contains a list of numbers like "1,2,3,4,5" and you want to select "4" then pass the value of "4" to the field.
- Example: objQFE.AddFieldToForm("1rep.BrNum", "4") will set the dropdown in branch number to "4"
- Text: if your dropdown lists contains text values like "AZ, CA, NV, TX" then you'll set the field value to the exact text value you want to select.
- Example: objQFE.AddFieldToForm("1own.H.State", "NV") will set the dropdown in home state to "NV"
, multiple selections available,
Related content
The Quik! Form Viewer
The Quik! Form Viewer
Read with this
Adding Dropdown Lists to a Form
Adding Dropdown Lists to a Form
More like this
Field Rules
Field Rules
Read with this
SetFieldTypeByFieldName Method
SetFieldTypeByFieldName Method
More like this
Base Field List
Base Field List
Read with this
SetFieldTypeByRole Method
SetFieldTypeByRole Method
More like this
For help regarding Quik! Forms and the Quik! API
Email: support@quikforms.com | Phone: (877) 456-QUIK