InAppFormField

A class represents a form field.

Class representing a form field.

Properties

PropertiesTypeDescription
descriptionStringThe description of the form field.
var description: String?
isMandatoryBooleanThe flag indicating whether the field is mandatory.
var isMandatory: Boolean
labelStringThe label of the form field.
var label: String?
nameStringThe name of the form field.
var name: String?
optionsArrayListThe options for the form field.
var options: ArrayList<String>
typeInAppFormFieldTypeThe type of the form field.
var type: InAppFormFieldType
valueStringThe value of the form field.
var value: String?
valuesArrayListThe values for the form field.
var values: ArrayList<String>

Functions

toJson

Converts the form field to a JSON object.

Syntax: fun toJson(): JSONObject

Return Value: The JSON object representing the form field.

Companion Functions

fromJson

Converts a JSONObject to an form field.

Syntax: fun fromJson(jsonObject: JSONObject): InAppFormField

Return Value The form field converted from the JSONObject.

Parameters

ParametersValueDescription
jsonObjectJSONObjectThe JSONObject to convert.