Loading
Salesforce now sends email only from verified domains. Read More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Textarea Lightning Web Component ReadMe (Managed Package)

          Textarea Lightning Web Component ReadMe (Managed Package)

          For the managed package runtime, this page contains a Textarea LWC ReadMe for each Vlocity release.

          Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

          Vlocity Insurance and Health Winter '20 and Vlocity CME Spring '20

          The Textarea Lightning Web Component creates an HTML textarea element for entering multi-line text input. A text area holds an unlimited number of characters.

          Available c-textarea Attributes

          Attrubute

          Value

          Type

          Required

          Description

          label

           

          string

          yes

          Adds a title for the textarea element.

          placeholder

           

          string

           

          Adds text to inside the textarea that displayed when the field is empty, prompting the user for a valid entry.

          name

           

          string

           

          Specifies the name of the textarea element.

          message-when-bad-input

           

          string

           

          Displays an error message when a bad input is detected.

          message-when-too-short

           

          string

           

          Displays an error message when the value is too short.

          message-when-too-long

           

          string

           

          Displays an error message when the value is too long.

          message-when-value-missing

           

          string

           

          Displays an error message when the value is missing.

          access-key

           

          string

           

          The keyboard shortcut for input field.

          max-length

           

          number

           

          The maximum number of characters allowed in the textarea.

          min-length

               

          Sets the minimum number of characters allowed in the textarea.

          value

           

          string

           

          Sets the value of the textarea input.

          disabled

               

          If present, the textarea field is disabled and users cannot interact with it.

          read-only

               

          If present, the textarea field is read-only and user cannot edit it.

          required

               

          If present, user must fill out textarea in order to submit the form.

          variant

          standard, label-hidden (Default: standard)

          string

           

          Changes the appearance of the input field.

          validity

               

          Sets the validity states for the textarea element, with respect to constraint validation.

          field-level-help

           

          string

           

          To provide an informational tooltip on the textarea input field, set this attribute.

          theme

          slds, nds, (Default: slds)

          string

          string

          Sets the theme for the textarea component.

          extraclass

               

          Adds a class to the textarea input element. To add multiple classes, use a space to separate each class, such as 'classone classtwo'.

          height

               

          Sets the height of the textarea.

          Example c-textarea Component

           <c-textarea
              label="Message When Value Long(30 char)"
              max-length="30"
              message-when-too-long="Value is too long."
              placeholder="Enter Description..."
          ></c-textarea>

          Available Methods

          checkValidity()

          Returns the valid attribute value (Boolean) on the ValidityState object.

          reportValidity()

          Displays the error messages and returns false if the input is invalid. If the input is valid, reportValidity() clears displayed error messages and returns true.

          setCustomValidity()

          Displays a custom error message when the textarea value is submitted. Takes the message argument. If message is an empty string, the error message is reset.

          showHelpMessageIfInvalid()

          Displays error messages on invalid fields. An invalid field fails at least one constraint validation and returns false when checkValidity() is called.

          focus()

          Sets focus on the textarea field.

          blur()

          Removes focus from the textarea field.

          Vlocity Insurance and Health Summer '19 and Vlocity CME Fall '19

          The Textarea Lightning Web Component creates an HTML textarea element for entering multi-line text input. A text area holds an unlimited number of characters.

          Available c-textarea Attributes

          Attrubute

          Value

          Type

          Required

          Description

          label

           

          string

          yes

          Adds a title for the textarea element.

          placeholder

           

          string

           

          Adds text to inside the textarea that displayed when the field is empty, prompting the user for a valid entry.

          name

           

          string

           

          Specifies the name of the textarea element.

          message-when-bad-input

           

          string

           

          Displays an error message when a bad input is detected.

          message-when-too-short

           

          string

           

          Displays an error message when the value is too short.

          message-when-too-long

           

          string

           

          Displays an error message when the value is too long.

          message-when-value-missing

           

          string

           

          Displays an error message when the value is missing.

          access-key

           

          string

           

          The keyboard shortcut for input field.

          max-length

           

          number

           

          The maximum number of characters allowed in the textarea.

          min-length

               

          Sets the minimum number of characters allowed in the textarea.

          value

           

          string

           

          Sets the value of the textarea input.

          disabled

               

          If present, the textarea field is disabled and users cannot interact with it.

          read-only

               

          If present, the textarea field is read-only and user cannot edit it.

          required

               

          If present, user must fill out textarea in order to submit the form.

          variant

          standard, label-hidden (Default: standard)

          string

           

          Changes the appearance of the input field.

          validity

               

          Sets the validity states for the textarea element, with respect to constraint validation.

          field-level-help

           

          string

           

          To provide an informational tooltip on the textarea input field, set this attribute.

          theme

          slds, nds, (Default: slds)

          string

          string

          Sets the theme for the textarea component.

          Example c-textarea Component

           <c-textarea
              label="Message When Value Long(30 char)"
              max-length="30"
              message-when-too-long="Value is too long."
              placeholder="Enter Description..."
          ></c-textarea>

          Available Methods

          checkValidity()

          Returns the valid attribute value (Boolean) on the ValidityState object.

          reportValidity()

          Displays the error messages and returns false if the input is invalid. If the input is valid, reportValidity() clears displayed error messages and returns true.

          setCustomValidity()

          Displays a custom error message when the textarea value is submitted. Takes the message argument. If message is an empty string, the error message is reset.

          showHelpMessageIfInvalid()

          Displays error messages on invalid fields. An invalid field fails at least one constraint validation and returns false when checkValidity() is called.

          focus()

          Sets focus on the textarea field.

          blur()

          Removes focus from the textarea field.

           
          Loading
          Salesforce Help | Article