java.lang.Object | ||
↳ | com.salesforce.android.chat.core.model.ChatUserData | |
↳ | com.salesforce.android.chat.ui.model.PreChatTextInputField |
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)
.
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.
| ||||||||||
boolean |
isCounterEnabled()
Whether or not the character counter is displayed under the text input.
| ||||||||||
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
|
The field label that will be displayed to the user on the pre-chat UI.
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.
The maximum length of value, used for field validation.
Whether or not a value has been assigned to this field.
Whether or not the character counter is displayed under the text input.
Whether or not the value of this field can be modified.
Whether or not this field is required to have a value before the pre-chat form can be submitted.
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.
Assign a CharSequence value to this field - Null will clear the assigned value.
Assign a value to this field. Values are ignored if they are not an instance of
CharSequence
. Null will clear the assigned value.