Sonataadminbundle: Adding symfony 'button' form type to FormMapper raises Exception

Created on 2 Sep 2015  路  8Comments  路  Source: sonata-project/SonataAdminBundle

The following code in an Admin class

protected function configureFormFields(FormMapper $formMapper)
{
    $formMapper->add('myButton', 'button');
}

throws this error:

The options "label_render", "sonata_field_description" do not exist. Defined options are: "attr", "auto_initialize", "block_name", "disabled", "label", "label_format", "translation_domain".

Doesn't seem to matter what options you specify

pending author stale

Most helpful comment

Feel free to provide a PR @lopezator 馃憤

All 8 comments

What should this button do?

I would expect it to create a ButtonType field

Same error with Sonata 3.23.0
I'm trying to create a ButtonType field and I'm getting this

The options "label_render", "property_path", "sonata_field_description" do not exist. Defined options are: "attr", "auto_initialize", "block_name", "disabled", "label", "label_format", "translation_domain"

AFAIK we don't support unmapped form fields. Maybe someone could create a PR with this feature?

It would be nice to support this feature. It's confusing that you can use some Symfony FormTypes and some not, mapped or not.

Feel free to provide a PR @lopezator 馃憤

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tiagojsag picture tiagojsag  路  4Comments

OskarStark picture OskarStark  路  4Comments

Max93 picture Max93  路  3Comments

peter-gribanov picture peter-gribanov  路  3Comments

core23 picture core23  路  3Comments