Skip to content

Radio button has problem #712

Open
Open
@sdvpnin

Description

@sdvpnin
        ->add('active', 'choice', [
            'label' => __('cruds.object.fields.active'),
            'choices' => ['yes' => 'Yes', 'no' => 'No'],
            'choice_options' => [
                'label_attr' => ['class' => 'label-class mx-1'],
            ],
            'selected' => 'no',
            'label_attr' => ['class' => 'col-md-2'],
            'expanded' => true,
            'multiple' => false
        ])

In model has yes value but it's selected no.
Add time work perfect with selected but edit time it's create the problem.so it's taking from selected attributes but not from the model
i try both
direct 'no' and with array also ['no']

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions