Warning: You are browsing the documentation for PrestaShop 8, which is outdated.

You might want to read an updated version of this page for the current version, PrestaShop 9. Read the updated version of this page

Learn how to update to the latest version.

RadioWithChoiceChildrenType

Combination of a RadioType and a ChoiceType fields

Type options

Option Type Default value Description
radio_name string Name of the radio input
radio_label string Label of the radio input
child_choice array Choices available in the ChoiceType

Code example

$builder->add('themes_selectors', RadioWithChoiceChildrenType::class, [
    'radio_name' => 'themes_type',
    'radio_label' => $this->trans('Theme translations', 'Admin.International.Feature'),
    'required' => false,
    'label' => null,
    'child_choice' => [
        'name' => 'selected_value',
        'empty' => $this->trans('Select a theme', 'Admin.International.Feature'),
        'choices' => $this->excludeDefaultThemeFromChoices($this->themeChoices),
        'label' => false,
        'multiple' => false,
    ],
]);

Preview example

RadioWithChoiceChildrenType rendered in form example