ICFormField (Discontinued)

🚧

Note

Please note that we have announced end of sale for Cordova SDK. It is no longer offered as a standard Webex Connect capability.

This class represents formField data for form attachment

setType

This method sets the type of FormField.

Parameters: 

ParameterTypeDescription
typeICFormFieldTypeType 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: 

ParameterTypeDescription
nameStringName 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: 

ParameterTypeDescription
labelStringformField’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: 

ParameterTypeDescription
valueStringThe 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: 

ParameterTypeDescription
descriptionStringThe 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: 

ParameterTypeDescription
mandatorybooleanTrue 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:

ParameterTypeDescription
optionsString[]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:

ParameterTypeDescription
jsonObjectJSONObjectA valid JSONObject instance containing form field data.

Return Value: Returns A new ICFormField or null if jsonObject is null.