FormField

data class FormField(val messageId: Long, val key: String, val title: String, val inputType: FormFieldInputType, val regex: String? = null, val placeholder: String? = null, val required: Boolean, val answer: Answer? = null)

Deprecated

Deprecated as 4.19.0. Use MessageFormItem instead.

Represents a form field where users can enter values.

Since

4.14.0

See also

Constructors

Link copied to clipboard
constructor(messageId: Long, key: String, title: String, inputType: FormFieldInputType, regex: String? = null, placeholder: String? = null, required: Boolean, answer: Answer? = null)

Properties

Link copied to clipboard
val answer: Answer? = null

The submitted answer to this form field. Null, if it is not submitted yet.

Link copied to clipboard

The input type of the form field.

Link copied to clipboard

Whether this form field is submittable or not.

Link copied to clipboard
val key: String

The key of the form field.

Link copied to clipboard

The id of the message to which the corresponding form belongs

Link copied to clipboard
val placeholder: String? = null

The placeholder of this form field when the input value is empty.

Link copied to clipboard
val regex: String? = null

The regular expression of this form field to validate the input value.

Link copied to clipboard

Whether this form field is required or not.

Link copied to clipboard

The temporary answer to this form field to store the input value before submitting. It becomes null when it is submitted.

Link copied to clipboard

The title of the form field.

Functions

Link copied to clipboard

Whether the given string is valid or not. If the regex is null or not a regular expression, it always returns true.