Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use Fieldsets in Block #2530

Closed
Tom-revere opened this issue Mar 8, 2024 · 1 comment
Closed

Unable to use Fieldsets in Block #2530

Tom-revere opened this issue Mar 8, 2024 · 1 comment

Comments

@Tom-revere
Copy link

Description

I am trying to create Fieldsets within a block using Form Builder, however they never render in the CMS.

Steps to reproduce

Create a new block
Replace the getForm function with the below

public function getForm(): Form
{        
    $form = Form::make();

    $form->add(Input::make()->name('title'));
    
    $form->withFieldSets(new Fieldsets([
        Fieldset::make()->title('Fieldset 1')->id('fieldset1')->fields([
            Input::make()
            ->name('fs1_content')
            ->label(twillTrans('FS 1 Content'))
        ]),
        Fieldset::make()->title('Fieldset 2')->id('fieldset2')->fields([
            Wysiwyg::make()
                ->name('fs2_content')
                ->label(twillTrans('FS 2 Content'))
            
        ])
    ]));

    $form->add(Input::make()->name('description'));

    return $form;
}

Expected result

It should show Fieldsets between Title and Description.

Actual result

It does not show any fieldsets, or the fields within these. Only Title and Description show.

Versions

Twill 3.2.0
Laravel 9.5.2
PHP 8.0.11
MySQL 5.7.33

@ifox
Copy link
Member

ifox commented May 30, 2024

Fieldsets are not currently supported in blocks and they haven't been designed to be supported there.

Moving this to a discussion, I'm curious to hear more about the use case for fieldsets in blocks.

@area17 area17 locked and limited conversation to collaborators May 30, 2024
@ifox ifox converted this issue into discussion #2590 May 30, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants