ICFormField
This class represents formField data for form attachment
setType
This method sets the type of FormField.
Parameters:
Parameter | Type | Description |
---|---|---|
type | ICFormFieldType | Type of the formField |
getType
This method is used to get the formField type (Text/Name/Email/Integer/Decimal/Date/Dropdown)
Return Value: Returns FormFieldType
setName
This method sets the name of FormField.
Parameters:
Parameter | Type | Description |
---|---|---|
name | String | Name of the formField |
getName
This method is used to get the formField name
Return Value: Returns String fromField name.
setLabel
This method sets the label of the FormField.
Parameters:
Parameter | Type | Description |
---|---|---|
label | String | formField’s label |
getLabel
This method is used to get the formField label
Return Value: Returns String fromField label.
setValue
This method sets the value of the FormField.
Parameters:
Parameter | Type | Description |
---|---|---|
value | String | The formField value from user |
getValue
This method is used to get the formField value
Return Value: Returns String The fromField value from user.
##setDescription
This method sets the description of FormField.
Parameters:
Parameter | Type | Description |
---|---|---|
description | String | The formField’s description |
getDescription
This method is used to get the formField description
Return Value: Returns String The fromField’s description.
setMandatory
This method sets whether it is mandatory to fill the FormField value or not.
Parameters:
Parameter | Type | Description |
---|---|---|
mandatory | boolean | True if it is mandatory for the current user to fill form field value |
isMandatory
This method returns whether it is mandatory for the user to fill the FormField value.
Return Value: Returns boolean true if it is mandatory for the current user to fill form field value.
setOptions
This method sets options for FormField type "dropdown".
Parameters:
Parameter | Type | Description |
---|---|---|
options | String[] | The formField’s options |
getOptions
This method is used to get the options for FormField type "Dropdown".
Return Value: Returns String[] options for formField Type "dropdown".
toJSON
This method returns a new JSONObject instance containing form field data.
Return Value: Returns JSONObject representation of the form field data.
fromJSON
Instantiates a new ICFormField instance from the supplied JSONObject.
Parameters:
Parameter | Type | Description |
---|---|---|
jsonObject | JSONObject | A valid JSONObject instance containing form field data. |
Return Value: Returns A new ICFormField or null if jsonObject is null.
Updated about 2 years ago