SetFieldTypeByRole Method
What it Does
Sets the type of all fields having a certain role. Usually fields are defaulted to textboxes, radio buttons or checkboxes. With this method, you can make a field be a DropDownList (select), a multiline field (textarea) or other types.
Parameters
Parameter | Type | Description |
---|---|---|
Role | String | The role of the field to be applied a type. E.g "1own" |
FieldType | AbstractFieldType | Base class representing a type. The child classes that can be used are described below, and can be retrieved using the FieldType module / static class, which has one method per available field type. |
FieldType options
Type | Parameters | Description | Sample Code |
---|---|---|---|
AltDataButton | valueList:List<string> → list of Level2 + Level 3 field parts that will cover the button. E.g: New List(Of String)({"LName", "FName"})) | Adds an alt data button ( + ) next to the field | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.AltDataButton(New List(Of String)({"LName", "FName"}))) |
DropDownList | valueList:List<string> → list of options to be built within the select tag. Each item will be both the value and the text of the html option tag | Converts the field (usually textbox) into a select element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.DropDownList(New List(Of String)({"NY", "CA", "NV"}))) |
MultiLine | No parameters | Converts the field (usually textbox) into a textarea element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.MultiLine()) |
Range | minValue:int → lower bound of the range maxValue:int → upper bound of the range | Converts the field into a range element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.Range(1, 100)) |
Month | No parameters | Converts the field into a month element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.Month()) |
Week | No parameters | Converts the field into a week element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.Week()) |
Time | No parameters | Converts the field into a time element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.Time()) |
DateTime | No parameters | Converts the field into a datetime element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.DateTime()) |
DateTimeLocal | No parameters | Converts the field into a datetimelocal element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.DateTimeLocal()) |
FTDate | No parameters | Converts the field into a date element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.FTDate()) |
No parameters | Converts the field into an email element | objQFE.SetFieldTypeByRole("1own", QuikFormsEngine.FieldType.Email()) |
For help regarding Quik! Forms and the Quik! API
Email: support@quikforms.com | Phone: (877) 456-QUIK