java.lang.Object | |
↳ | com.salesforce.android.chat.ui.model.PreChatTextInputField.Builder |
Used to construct PreChatTextInputField
objects for requesting text input from the user
during pre-chat.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builder() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PreChatTextInputField |
build(String displayLabel, String agentLabel)
Create a new text input pre-chat field with the specified configuration.
| ||||||||||
PreChatTextInputField.Builder |
counterEnabled(boolean isCounterEnabled)
Enable or disable the character counter displayed under the text field.
| ||||||||||
PreChatTextInputField.Builder |
displayedToAgent(boolean isDisplayedToAgent)
Whether or not this field should be displayed to the agent in the Service Cloud Console.
| ||||||||||
PreChatTextInputField.Builder |
initialValue(CharSequence initialValue)
Set the initial value of the field.
| ||||||||||
PreChatTextInputField.Builder |
inputType(int inputType)
The type of input that is expected - This value is used to change the soft keyboard layout
that is presented to the user while editing the text field and may be a value from
android.text.InputType or EditorInfo.
| ||||||||||
PreChatTextInputField.Builder |
mapToChatTranscriptFieldName(String transcriptFieldName)
A Live Chat Transcript Custom Field that the
PreChatTextInputField value will be
applied to. | ||||||||||
PreChatTextInputField.Builder |
maxValueLength(int maxValueLength)
The maximum length for the
CharSequence value of this field. | ||||||||||
PreChatTextInputField.Builder |
readOnly(boolean isReadOnly)
Declare that the value shouldn't be changed.
| ||||||||||
PreChatTextInputField.Builder |
required(boolean isRequired)
Declare that the field must have a value set in order to pass validation.
| ||||||||||
PreChatTextInputField.Builder |
validator(PreChatTextInputField.Validator validator)
**OPTIONAL** Declare a
PreChatTextInputField.Validator implementation by which this field's value will be evaluated. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a new text input pre-chat field with the specified configuration.
Enable or disable the character counter displayed under the text field. Default is true.
Whether or not this field should be displayed to the agent in the Service Cloud Console. Default value is true.
Set the initial value of the field.
The type of input that is expected - This value is used to change the soft keyboard layout
that is presented to the user while editing the text field and may be a value from
android.text.InputType or EditorInfo. Default is
TYPE_CLASS_TEXT
.
A Live Chat Transcript Custom Field that the PreChatTextInputField
value will be
applied to. More than one may be specified.
The maximum length for the CharSequence
value of this field. A length that exceeds the
maximum will cause the field to fail validation. Default value is 0, which means there is no
maximum length.
Declare that the value shouldn't be changed. Fields which are marked as read only will ignore
values passed to setValue(CharSequence)
. You may want to set
a permanent value for this field by using initialValue(CharSequence)
. Default is
false, meaning the field is writable.
Declare that the field must have a value set in order to pass validation. Default is false, meaning the field is not required.
**OPTIONAL** Declare a PreChatTextInputField.Validator
implementation by which this field's value will be evaluated.
The validator will be used when calls are made to isSatisfied()
and the
return value will impact the eligibility of the pre-chat form's submission by the user.