Multi-Line
Multi Line is a text box, which allows you to write multiple lines of text.
Example
API Methods
setLabel
Sets the label of the text field.
- Method
- Usage
setLabel(label: string): void
// Sets the field's label to 'Comment'
a8forms.Input("multilineId").setLabel("Comment")
setPlaceholder
Sets the placeholder as a string that temporarily holds the place for the final data.
- Method
- Usage
setPlaceholder(placeholder: string): void
// Sets the placeholder as 'Type your Comments Here' in the text field of your Multi-Line component
a8forms.Input("multilineId").setPlaceholder("Type your Comments Here")
setReadOnly
Sets the ReadOnly flag for this component.
- Method
- Usage
setReadOnly(readOnly: boolean): void
//sets the field to ReadOnly, not editable by the user
a8forms.Input("multilineId").setReadOnly(true)
// Sets the field to be active, editable by the user
a8forms.Input("multilineId").setReadOnly(false)
setRequired
Sets a field to be required or not.
- Method
- Usage
setRequired(required: boolean): void
// Sets the field as required
a8forms.Input("multilineId").setRequired(true)
// Sets the field as not required
a8forms.Input("multilineId").setRequired(false)
setSize
Sets the size only using the parameters passed in.
- Method
- Usage
setSize(size: "small" | "medium" | "large"): void
//Sets the size to small
a8forms.Input("multilineId").setSize("small")
//Sets the size to medium
a8forms.Input("multilineId").setSize("medium")
//Sets the size to large
a8forms.Input("multilineId").setSize("large")
setValue
Sets the value of a field.
- Method
- Usage
setValue(value: string): void
// Sets the value of the multiline field
a8forms.Input("multilineId").setValue('The MultiLine Value');
setVisibility
Sets if elements of the given category is visible in this view.
- Method
- Usage
setVisibility(visible: boolean): void
// setting the visibility true makes the element to visible
a8forms.Input("multilineId").setVisibility(true)
// setting the visibility false makes the element to not visible
a8forms.Input("multilineId").setVisibility(false)
setVisibilityCondition
Sets the hide condition
- Method
- Usage
setVisibilityCondition(condition: string): void
// Hides the string
a8forms.Input("multilineId").setVisibilityCondition("1 == 1");