litstack
litstack copied to clipboard
Bug: $form-group() in repeatable
$form->group() seems to not work properly inside repeatable. The following config results in 2 title and 2 body fields rendered, while it should be only 1.
$form->block('image_cards')
->repeatables(function ($repeatables) {
$repeatables->add('card', function ($form, $preview) {
$preview->col('{title}');
$form->group(function ($form) {
$form->input('title');
$form->textarea('body');
})->width(8);
$form->image('image')->maxFiles(1)->translatable()
->showFullImage()->width(4);
});
})

It seems this is also problematic:
$form->group(....)->when(...)->orWhen(...);
The when conditions are not respected, the group is always rendered..
Will have a look on this 🤔
@cbl Is the bug confirmed?
This field duplication also occurs when trying to use a group inside a (BaseForm) macro.