-
Notifications
You must be signed in to change notification settings - Fork 63
Closed as not planned
Description
We are trying to get return format "array" from a checkbox but it's always output as value.
We tried this :
->addCheckbox('global_btn_style', ['label' => 'Styles possible','return_format'=>'array', 'allow_custom'=> true,'allow_null'=>false])
->addChoices(
['default' => COLORDEFAULT],
['primary' => COLORPRIMARY],
['secondary' => COLORSECONDARY],
['danger' => 'danger'],
['text' => 'text'],
['link' => 'link']
)
->setDefaultValue(['default','primary','secondary'])
And a simplier one :
->addCheckbox('checkbox_field', [
'label' => 'Checkbox Field',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => [
'width' => '',
'class' => '',
'id' => '',
],
'choices' => ['dsfsd'],
'allow_custom' => 0,
'save_custom' => 0,
'default_value' => [],
'layout' => 'vertical',
'toggle' => 0,
'return_format' => 'array',
]);
Both aren't working
edit formating
Metadata
Metadata
Assignees
Labels
No labels