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

Can't use Form Columns in BlockComponent #2229

Closed
kerkness opened this issue Apr 14, 2023 · 4 comments
Closed

Can't use Form Columns in BlockComponent #2229

kerkness opened this issue Apr 14, 2023 · 4 comments

Comments

@kerkness
Copy link
Contributor

kerkness commented Apr 14, 2023

Description

Using Columns::make() in a BlockComponent doesn't appear to work. Inputs render as expected but values are not saved.

Steps to reproduce

Create a blockComponent with the following getForm method

public function getForm(): Form
{
    return Form::make([
        Medias::make()->name('content_image'),
        Input::make()->name('title')->label('Title'),
        Wysiwyg::make()->name('text')->label('Caption'),
        Columns::make()
            ->left([
                Input::make()->name('height')->label('Height'),
            ])
            ->right([
                Input::make()->name('width')->label('Width'),
            ]),
    ]);
}

Expected result

Would expect that height and width input values are saved and accessible

Actual result

Height and Width inputs are not saved. Form however renders as expected.

Versions

Twill 3.x
Laravel 10.x

@ifox
Copy link
Member

ifox commented Apr 14, 2023

Hi @kerkness, we are going to need more detail. What do you mean by "can't use Form"?

@kerkness
Copy link
Contributor Author

I hit enter before adding my comment :P

@kerkness kerkness changed the title Can't use Form Can't use Form Columns in BlockComponent Apr 14, 2023
@ifox
Copy link
Member

ifox commented Apr 14, 2023

Thanks @kerkness, no worries!

This PR was meant to fix columns support in block components, we'll take another look!

@kerkness
Copy link
Contributor Author

Okay my bad. looks like i didn't have the latest release

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

2 participants