Radio Buttons
The Radio buttons component adds a list of mutually exclusive options from which users can select only one. This component is used when you need the user to make a single choice from a predefined, typically short, set of options, and you want all available options to be immediately visible on the form without taking up excessive screen space for descriptions. Each option consists of a display label and an associated stored value.
Use the Select (Single) component when the list of options is long or when screen space is limited.
The class of the stored value is String. It represents the value of the selected option.
General properties
Property | Description |
---|---|
ID | The identifier of the component, primarily used for client-side interactions and identification in the HTML structure of the form. When you add a component, an ID is automatically generated to ensure it is unique in the form. |
Label | Text that appears above the form component in Collibra, briefly describing its purpose. This is the main title or question for the field. |
Label tooltip |
Additional help or information about the field. If defined, a question mark icon appears after the label, showing the tooltip when users hover their pointer over the icon. The tooltip supports plain text only. |
Documentation | A text field for internal design notes or future reference about this specific component. This information is not visible in Collibra. |
Value |
The name of the variable that stores the data entered into this field in Collibra. Use a variable name enclosed in double curly braces, for example You can also specify where the variable is saved:
|
Default value | The pre-filled value for the component when the form first appears. A filed shows the default value if the Value property does note set a value explicitly. |
Tab Index | The tabbing order of this component in a user task form. When navigating through the form by pressing the Tab key, the cursor moves from one component to another based on their assigned tab index numbers. The component with the lowest tab index number receives focus first. The focus then moves sequentially to the component with the next highest number. For example, a component with a tab index of 1 receives focus before a component with a tab index of 2. The tab index is ignored if the component is inside a subform. |
Datasource properties
Datasource properties are common to the components that accept a list of items or options.
Property | Description |
---|---|
Items | A list of text labels and values for the items or options shown in Collibra. If you want to use dynamic values, provide an object that is declared as a list of maps that contain text and value elements, for example |
Storage | Specifies how the component variable stores the input data:
Storing the full value could lead to variables full of unnecessary information. |
Format | Currently not in use. |
Map to Track by |
Specifies which attribute of a data source item to use as the value for the item. Currently, the only option is value. |
Validation properties
Attribute | Description |
---|---|
Required | Whether the component must have a value for the form to be submitted. |
Custom validations | A list of additional validations for the component. Each custom validation consists of two parts:
For example, you can create a validation with the expression |
Rendering properties
Property | Description |
---|---|
Ignored | Whether the component is be hidden in the form and any value it might hold is not included in the submission data. |
Visible | Whether the component is shown or hidden on the form. You can controlled this unconditionally or through an expression. For example, you can set an expression that hides or shows the component based on a user selection in another component. This property is enabled by default. |
Enabled | Whether the component is interactive or read-only on the form. When disabled, users cannot change the component value. This property is enabled by default. |
Description | Additional information shown in Collibra below the form field, providing detailed instructions, examples, or essential guidance. |
To add your radio button options:
- Select the component on the canvas.
- In the property bar, select
Datasource → Items.
The Items dialog box appears.
- Click Add
to insert items consisting of a text label and associated value.
- Click Finish to save the items and close the dialog box.
You can also connect the selected radio button option to another component to build a dynamic dependency between them.
Example
In this example, we are configuring a text input component to display when a specific radio button option is selected.
We have already added the radio button and text input field to the canvas. The value of the radio button component value is set to {{exampleRadioButton}}.
See our Form expression article for more information.
For each radio button, enter the Text and Value:
- Text:Item 1, Value:radioID1.
- Text:Item 2, Value:radioID2.
By default, the radio button stores the ID of the select value item. The condition should return true
if the variable exampleRadioButton is equal to the ID of the second radio button option. Since the ID is a String type, the expression should look like this:
{{exampleRadioButton == "radioID2"}}
You now need to add this expression to the Visible attribute of the text input component:
- Select the text input component.
- In the property bar, select
Rendering → Visible.
- Select
the expression mode.
The visible property switches from normal to expression mode.
- Enter your expression.
- Click Finish to save the changes and close the dialog box.
You can now use the preview mode in the form editor to see that the text input component is visible only if the second radio button item is selected.