Skip to content

Commit

Permalink
Merge branch 'pr/2227' into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ifox committed Apr 14, 2023
2 parents e440d75 + 615aa9d commit 65aa636
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions docs/content/1_docs/3_modules/7_form-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ There are 2 `Form` methods that you can do this with:
```php
$form->withFieldSets([
Fieldset::make()->title('Fieldset 1')->id('fieldset')->fields([
// Fields come here.
// Field definitions come here.
]),
Fieldset::make()->title('Fieldset 2')->id('fieldset')->fields([
// Fields come here.
// Field definitions come here.
])
]);
```
Expand All @@ -111,11 +111,22 @@ Or if you need more control:
```php
$form->addFieldset(
Fieldset::make()->title('Fieldset!')->id('fieldset')->fields([
// Fields come here.
// Field definitions come here.
])
);
```

For example...

```php
$form->addFieldset(
Fieldset::make()->title('Opengraph')->id('opengraph')->fields([
Input::make()->name('og_title')->label('OG Title'),
Input::make()->name('og_description')->label('OG Description'),
Files::make()->name('og_image')->label('OG Image')
])
);
```
## Other utilities

### Columns field
Expand Down

0 comments on commit 65aa636

Please sign in to comment.