Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Updating Fieldset UiComponent documentation (#6045)
Browse files Browse the repository at this point in the history
* Adding the Fieldset UiComponent additional information

* Updating the example

* Minor adjustments

* Update ui-fieldset.md
  • Loading branch information
eduard13 authored and keharper committed Nov 21, 2019
1 parent f9436b7 commit 2d418ce
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions guides/v2.2/ui_comp_guide/components/ui-fieldset.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,48 @@ The Fieldset component implements a container for visually-grouped form elements
| Title | Type | Default | Description |
| ------------- | ------- | ------- | --------------------------------------------------------------------------------- |
| `collapsible` | Boolean | `false` | Enables/disables the collapsible functionality. |
| `label` | String | | Caption for the fieldset. |
| `opened` | Boolean | `false` | Initial collapsible state. Applied when the collapsible functionality is enabled. |

## Examples

### Integrate the Fieldset component with the Form component

The following example adds a new main fieldset that contains a collapsible fieldset into the [Form]({{ page.baseurl }}/ui_comp_guide/components/ui-form.html) component:

```xml
<form>
<fieldset name="main_fieldset">
<settings>
<label translate="true">Other Settings</label>
</settings>
<fieldset name="fieldset_group">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Information</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="opened" xsi:type="boolean">true</item>
</item>
</argument>
<field name="my_field">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">My Field</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
</item>
</argument>
</field>
</fieldset>
</fieldset>
</form>
```

#### Result

![Checkbox UiComponent]({{ site.baseurl }}/common/images/ui_comps/fieldset-component-result.png)

## Source files

Extends [`uiCollection`]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_uicollection_concept.html) and `collapsible`:
Expand Down

0 comments on commit 2d418ce

Please sign in to comment.