Skip to content
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

Open
Tom-revere opened this issue Mar 8, 2024 · 0 comments
Open

Unable to use Fieldsets in Block #2530

Tom-revere opened this issue Mar 8, 2024 · 0 comments

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant