SetFieldPropertyByFieldName Method
What it Does
Set all the fields of a given partial field name (e.g. "FName", usually level 2 and level 3 field parts) to a property setting (e.g. read only, hidden, required, etc.).
Parameters
Parameter | Type | Description |
---|---|---|
sender | FieldPropertiesInBulkByFieldName | Wrapper class of properties to be set up by partial field name |
FieldPropertiesInBulkByFieldName object
Parameter | Type | Description |
---|---|---|
FieldName | String | The partial field name to be used. All fields containing this string will have the properties set up. E.g. "Name" will cover fields "FName", "MName", "LName", etc. |
FieldVisibility | QFD.FieldVisibility | Sets the visibility of the field. Values:
|
FieldReadOnly | QFD.FieldReadOnly | Sets the read-only level of the field. Values:
|
FieldRequired | QFD.FieldRequired | Sets the required level of the field. Values:
|
FieldMaskFlag | Boolean | If true, the field will be masked (password field) |
FieldFormat | String | Sets the format to be applied to the value of the field |
FieldCalcOverride | Boolean | If true, calculations are not enabled for the field. Usually used with calculated fields, like FullName or Addr123 |
HiddenField | Boolean | If true, the field will be a hidden input (input type = "hidden") |
FieldBackgroundColor | String | Sets the background color of the field. E.g "#CCC", or "#AABBCC" |
MaxCharLength | String | Sets the maximum character length that may be entered into a field. For example, if MaxCharLength = "5", then users may not type a value into a given field that is more than 5 characters long–the value will cut off after the 5th character. However, this field may still be prefilled with data that is longer than 5 characters (maximum length only takes effect when values are manually typed onto the form by users). |
Sample Code
Dim objQFE As New QuikFormsEngine Dim fieldProperties As New FieldPropertiesInBulkByFieldName() With {.FieldName = "FName", .FieldBackgroundColor = "#CCC"} objQFE.SetFieldPropertyByFieldName(fieldProperties) Dim fieldProperties2 As New FieldPropertiesInBulkByFieldName() With {.FieldName = "Addr123", .FieldCalcOverride = True} objQFE.SetFieldPropertyByFieldName(fieldProperties2)
Method overloads
Even though we strongly suggest using the method described above, the QuikFormsEngine includes old overloads for legacy implementations. The overloads are listed below and the idea is that the field properties are passed in as parameters instead of within a wrapper class.
Public Sub SetFieldPropertyByFieldName(FieldName As String, FieldReadOnly As FieldReadOnly, FieldVisibility As FieldVisibility, FieldRequired As FieldRequired, FieldFormat As String, FieldMaskFlag As Boolean, FieldCalcOverride As Boolean, HiddenField As Boolean, FieldBackgroundColor As String) Public Sub SetFieldPropertyByFieldName(FieldName As String, FieldReadOnly As FieldReadOnly) Public Sub SetFieldPropertyByFieldName(FieldName As String, FieldVisibility As FieldVisibility) Public Sub SetFieldPropertyByFieldName(FieldName As String, FieldRequired As FieldRequired) Public Sub SetFieldPropertyByFieldName(FieldName As String, FieldFormat As String) Public Sub SetFieldPropertyByFieldName(FieldName As String, FieldFormat As String, FieldBackgroundColor As String) Public Sub SetFieldPropertyByFieldName(FieldName As String, FieldMaskFlag As Boolean) Public Sub SetFieldPropertyByFieldName(FieldName As String, FieldMaskFlag As Boolean, FieldCalcOverride As Boolean) Public Sub SetFieldPropertyByFieldName(FieldName As String, FieldMaskFlag As Boolean, FieldCalcOverride As Boolean, FieldHiddenField As Boolean)
Related pages
For help regarding Quik! Forms and the Quik! API
Email: support@quikforms.com | Phone: (877) 456-QUIK