public final class

PreChatTextInputField

extends ChatUserData
java.lang.Object
   ↳ com.salesforce.android.chat.core.model.ChatUserData
     ↳ com.salesforce.android.chat.ui.model.PreChatTextInputField

Class Overview

A pre-chat field used to request text input from the user. Text fields can be created via PreChatTextInputField.Builder and provided to chatUserData(ChatUserData).

Summary

Nested Classes
class PreChatTextInputField.Builder Used to construct PreChatTextInputField objects for requesting text input from the user during pre-chat. 
interface PreChatTextInputField.Validator Validator offers an extensible way for you to perform custom validation on values applied to PreChatTextInputField
Public Methods
final String getDisplayLabel()
The field label that will be displayed to the user on the pre-chat UI.
int getInputType()
The type of input that is expected - This value is used to change the soft input method for the text field and may be a value from android.text.InputType or EditorInfo.
int getMaxValueLength()
The maximum length of value, used for field validation.
final boolean hasValue()
Whether or not a value has been assigned to this field.
final boolean isReadOnly()
Whether or not the value of this field can be modified.
final boolean isRequired()
Whether or not this field is required to have a value before the pre-chat form can be submitted.
boolean isSatisfied()
Returns true if the validation conditions for this field are met and the pre-chat form can be submitted.
void setValue(CharSequence value)
Assign a CharSequence value to this field - Null will clear the assigned value.
void setValue(Object value)
Assign a value to this field.
[Expand]
Inherited Methods
From class com.salesforce.android.chat.core.model.ChatUserData
From class java.lang.Object

Public Methods

public final String getDisplayLabel ()

The field label that will be displayed to the user on the pre-chat UI.

public int getInputType ()

The type of input that is expected - This value is used to change the soft input method for the text field and may be a value from android.text.InputType or EditorInfo.

public int getMaxValueLength ()

The maximum length of value, used for field validation.

public final boolean hasValue ()

Whether or not a value has been assigned to this field.

public final boolean isReadOnly ()

Whether or not the value of this field can be modified.

public final boolean isRequired ()

Whether or not this field is required to have a value before the pre-chat form can be submitted.

public boolean isSatisfied ()

Returns true if the validation conditions for this field are met and the pre-chat form can be submitted. Text input fields are satisfied by default, but a required text input field is considered satisfied once a CharSequence value has been assigned with setValue(CharSequence). If you have provided a PreChatTextInputField.Validator implementation for this field, the isValid(CharSequence) implementation must return true for the field to be evaluated as satisfied.

public void setValue (CharSequence value)

Assign a CharSequence value to this field - Null will clear the assigned value.

public void setValue (Object value)

Assign a value to this field. Values are ignored if they are not an instance of CharSequence. Null will clear the assigned value.