I am trying to implement a multi choice for a custom field.
Currently i use form factory with this for simple fields :
$fieldset->addField(
'mail',
'text',
['name' => 'mail', 'label' => __('Mail'), 'title' => __('Mail'), 'required' => true]
);
Now i want checkbox or multiselect, i already see this :
$fieldset->addField(
'test',
'multiselect',
[
'name' => 'name',
'label' => __('test'),
'title' => __('test'),
'required' => true,
'values' => $optionLanguage,
'disabled' => false
]
);
But I don't know how to write my $optionLanguage
array, I just want simple option (option 1: Fr, option 2: En).
Don't matter checkbox or multiselect, checkbox is better for me but if multiselect is easier i will go for it.