Open sdvpnin opened 1 year ago
Can you put some debug in ChoiceType::buildCheckableChildren()
? And maybe in CheckableType
? To find out where the bug comes from. I never use choice
fields, but rdx/laravel-form-builder-extras
, so you're going to have to help me.
Model data is used only if the value property (value
or selected
) is NULL
.
You can use default_value
.
$this
->add('active', 'choice', [
'choices' => ['yes' => 'Yes', 'no' => 'No'],
'default_value' => 'no',
]);
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']