Form group
A container for form elements that has a built-in label, required/optional indicators, error messages, and layout options
slot
slot here
Variant
Section titled “Variant”fieldset variant to use the fieldset/legend semantic pattern. This is useful for patterns with a shared heading for multiple checkbox or radio controls. Layout
Section titled “Layout”certara-form-group
Section titled “certara-form-group”Properties
Section titled “Properties”error
| Attribute | error |
| Type | string |
| Default | '' |
| Required | false |
| Description | Returns formatted error messages related to the field |
groupId
| Attribute | group-id |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Custom ID for the group element (used for aria-labelledby relationship) |
hideLabel
| Attribute | hide-label |
| Type | boolean |
| Default | false |
| Required | false |
| Description | Will visually hide the label |
label
| Attribute | label |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Label that represents the form control |
layout
| Attribute | layout |
| Type | "horizontal" | "stacked" |
| Default | 'stacked' |
| Required | false |
| Description | Place label adjacent to input controls, or stack them vertically |
showOptional
| Attribute | show-optional |
| Type | boolean |
| Default | false |
| Required | false |
| Description | Indicator that a field is optional. If both showRequired and showOptional are true, showRequired will take precedence. |
showRequired
| Attribute | show-required |
| Type | boolean |
| Default | false |
| Required | false |
| Description | Indicator that a field is required |
variant
| Attribute | variant |
| Type | "fieldset" | "group" |
| Default | 'group' |
| Required | false |
| Description | Render container as a fieldset or as a div |
Events
Section titled “Events”There are no events available for this component
Methods
Section titled “Methods”| Name | Signature | Description |
|---|---|---|
getLabelId | () => Promise<string> | Returns the label element’s ID for aria-labelledby association |
setFormControlId | (id: string) => Promise<void> |
| Name | Description |
|---|---|
| Main content for help block | |
help | Additional descriptive text for the form-group |
label-slot | Slot that supplements label attribute if rich content is required |