Skip to content

Commit

Permalink
Update section documentation (#893)
Browse files Browse the repository at this point in the history
* Added title_level to section docs

Introduced in getgrav/grav-plugin-form#459

* Add section to frontend form documentation

I've removed the underline option, as it is not working with the default themes.
  • Loading branch information
NicoHood authored Jan 11, 2021
1 parent 6281e86 commit e8251ff
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pages/06.forms/01.blueprints/01.fields-available/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -893,12 +893,13 @@ content:
[/prism]

[div class="table table-keycol"]
| Attribute | Description |
| :----- | :----- |
| `title` | A heading title |
| `underline` | Add an underline after the title |
| `text` | A text to show beneath |
| `security` | An array of credentials a user needs to visualize this section |
| Attribute | Description |
| :----- | :----- |
| `title` | A heading title |
| `underline` | Add an underline after the title |
| `text` | A text to show beneath |
| `security` | An array of credentials a user needs to visualize this section |
| `title_level` | Set a custom headline tag. Default: `h3` |
[/div]


Expand Down
28 changes: 28 additions & 0 deletions pages/06.forms/02.forms/02.fields-available/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,34 @@ header.choose_a_number_in_range:

---

### Section Field

The `Section` field type is used to divide a setting page into sections.

Example:

[prism classes="language-yaml line-numbers"]
content:
type: section
title: PLUGIN_ADMIN.DEFAULTS
underline: true

fields:

#..... subfields
[/prism]

[div class="table table-keycol"]
| Attribute | Description |
| :----- | :----- |
| `title` | A heading title |
| `text` | A text to show beneath |
| `security` | An array of credentials a user needs to visualize this section |
| `title_level` | Set a custom headline tag. Default: `h3` |
[/div]

---

### Select Field

![Select Field](select_field.gif)
Expand Down

0 comments on commit e8251ff

Please sign in to comment.