From 615aa9dd9ad98a1bc717c4f22a46794b704a313b Mon Sep 17 00:00:00 2001 From: tttogo Date: Thu, 13 Apr 2023 15:59:37 +0100 Subject: [PATCH] Form Builder: Provide more explicit directions on Fieldsets Added an example as well, thanks to EpicKau! --- docs/content/1_docs/3_modules/7_form-builder.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/content/1_docs/3_modules/7_form-builder.md b/docs/content/1_docs/3_modules/7_form-builder.md index 2e202c383..d5fe488a1 100644 --- a/docs/content/1_docs/3_modules/7_form-builder.md +++ b/docs/content/1_docs/3_modules/7_form-builder.md @@ -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. ]) ]); ``` @@ -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