Lucius Vorenus
04/11/2023, 8:59 PMEpicKau
04/11/2023, 9:29 PM$form->addFieldset(
Fieldset::make()->title('Opengraph!')->id('opengraph')->fields([
// Fields come here.
])
);
EpicKau
04/11/2023, 9:29 PMLucius Vorenus
04/12/2023, 9:00 AM(doesn't exist in
A17\Twill\Services\Forms\Fieldset`). Sppent some time investigating this, but couldn't get anywhere.
As a workaround, I pedalled back to using blade forms, but adding a named fieldset to the @section('sideFieldSet)
inserts it inside the 'Options' fieldset.
Again, appreciate the reply.EpicKau
04/12/2023, 10:50 AMpublic function getSideFieldsets(TwillModelContract $model): Form
{
$form = parent::getSideFieldsets($model);
// https://github.com/area17/twill/issues/2214
// test dummy
$form->add(Input::make()->name('dummy')->label('dummy'));
$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')
])
);
return $form;
}
Lucius Vorenus
04/12/2023, 11:30 AM//Fields come here
(3 instances), could you change it to //Field definitions come here
, or similar, for the hard of understanding amongst us?
Even having an actual field definition, like you took the trouble to do above, would be even better.
Thanks again. The support (and patience) on here is fantastic. More people should be telling you that! ( Twill has really caught my imagination (this from somebody who used to use Drupal))EpicKau
04/12/2023, 11:40 AMLucius Vorenus
04/12/2023, 11:47 AM//Fields come here
(3 instances), could you change it to //Field definitions come here
, or similar, for the hard of understanding amongst us?
You probably need a day or two's sleep after the last few! The new docs look very good!ifox
04/13/2023, 10:20 AMLucius Vorenus
04/13/2023, 11:10 AMifox
04/13/2023, 11:11 AM