Input Group
Input Group enhances the input widget by adding a button next to the text field.
Example
API Methods
setButtonText
Sets the text for custom text buttons.
- Method
- Usage
setButtonText(buttonText: string): void
// Sets the text for the button as Sign In
a8forms.ButtonText("ButtonTextId").setButtonText("Sign In")
setLabel
Sets the label of the field.
- Method
- Usage
setLabel(label: string): void
// Sets the field's label to 'My Text'
a8forms.InputGroup("widgetId").setLabel('My Text')
setPlaceholder
Sets the placeholder as a string that temporarily holds the place to the final data.
- Method
- Usage
setPlaceholder(placeholder: string): void
// Sets the placeholder as Email in a text field
a8forms.InputGroup("widgetId").setPlaceholder("Email")
setReadOnly
Sets the ReadOnly flag for this context.
- Method
- Usage
setReadOnly(readOnly: boolean): void
//sets the field to ReadOnly not editable by the user
a8forms.InputGroup("widgetId").setReadOnly(true)
// Sets the field to be active, editable by the user
a8forms.InputGroup("widgetId").setReadOnly(false)
setRequired
Sets a field to be required or not.
- Method
- Usage
setRequired(required: boolean): void
// Sets the field as required
a8forms.InputGroup("widgetId").setRequired(true)
// Sets the field as not required
a8forms.InputGroup("widgetId").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.InputGroup("widgetId").setSize("small")
//Sets the size to medium
a8forms.InputGroup("widgetId").setSize("medium")
//Sets the size to large
a8forms.InputGroup("widgetId").setSize("large")
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.InputGroup("<widgetId>").setVisibility(true)
// setting the visibility false makes the element to not visible
a8forms.InputGroup("widgetId").setVisibility(false)
setVisibilityCondition
Sets the hide condition
- Method
- Usage
setVisibilityCondition(condition: string): void
// Hides the string
a8forms.InputGroup("inputgroupId").setVisibilityCondition("1 == 1");