public static class

PreChatTextInputField.Builder

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

Class Overview

Used to construct PreChatTextInputField objects for requesting text input from the user during pre-chat.

Summary

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 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

Public Constructors

public Builder ()

Public Methods

public PreChatTextInputField build (String displayLabel, String agentLabel)

Create a new text input pre-chat field with the specified configuration.

public PreChatTextInputField.Builder displayedToAgent (boolean isDisplayedToAgent)

Whether or not this field should be displayed to the agent in the Service Cloud Console. Default value is true.

public PreChatTextInputField.Builder initialValue (CharSequence initialValue)

Set the initial value of the field.

public 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. Default is TYPE_CLASS_TEXT.

public PreChatTextInputField.Builder mapToChatTranscriptFieldName (String transcriptFieldName)

A Live Chat Transcript Custom Field that the PreChatTextInputField value will be applied to. More than one may be specified.

public PreChatTextInputField.Builder maxValueLength (int maxValueLength)

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.

public PreChatTextInputField.Builder readOnly (boolean isReadOnly)

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.

public PreChatTextInputField.Builder required (boolean isRequired)

Declare that the field must have a value set in order to pass validation. Default is false, meaning the field is not required.

public PreChatTextInputField.Builder validator (PreChatTextInputField.Validator validator)

**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.