Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What it Does

Sets the type of the field, given its name. 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

FieldNameStringThe name attribute of the field to be applied a type. E.g "1own.FName"
FieldTypeAbstractFieldTypeBase 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

ParametersDescriptionSample 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 fieldobjQFE.SetFieldTypeByFieldName("1own.LName", QuikFormsEngine.FieldType.AltDataButton(New List(Of String)({"LName", "FName"})))
DropDownListvalueList: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 tagConverts the field (usually textbox) into a select elementobjQFE.SetFieldTypeByFieldName("1own.LName", QuikFormsEngine.FieldType.DropDownList(New List(Of String)({"NY", "CA", "NV"})))
MultiLineNo parametersConverts the field (usually textbox) into a textarea elementobjQFE.SetFieldTypeByFieldName("1own.LName", QuikFormsEngine.FieldType.MultiLine())
Range

minValue:int → lower bound of the range

maxValue:int → upper bound of the range

Converts the field into a range elementobjQFE.SetFieldTypeByFieldName("1own.LName", QuikFormsEngine.FieldType.Range(1, 100))
MonthNo parametersConverts the field into a month elementobjQFE.SetFieldTypeByFieldName("1own.LName", QuikFormsEngine.FieldType.Month())
WeekNo parametersConverts the field into a week elementobjQFE.SetFieldTypeByFieldName("1own.LName", QuikFormsEngine.FieldType.Week())
TimeNo parametersConverts the field into a time elementobjQFE.SetFieldTypeByFieldName("1own.LName", QuikFormsEngine.FieldType.Time())
DateTimeNo parametersConverts the field into a datetime elementobjQFE.SetFieldTypeByFieldName("1own.DOB", QuikFormsEngine.FieldType.DateTime())
DateTimeLocalNo parametersConverts the field into a datetimelocal elementobjQFE.SetFieldTypeByFieldName("1own.DOB", QuikFormsEngine.FieldType.DateTimeLocal())
FTDateNo parametersConverts the field into a date elementobjQFE.SetFieldTypeByFieldName("1own.DOB", QuikFormsEngine.FieldType.FTDate())
EmailNo parametersConverts the field into an email elementobjQFE.SetFieldTypeByFieldName("1own.Mail", QuikFormsEngine.FieldType.Email())