tomzidani Posted February 18, 2023 Share Posted February 18, 2023 Hello, I have a module where I have a form with which I can choose a category. Is it possible to have multiple categories selected ? Like, if I choose a subcategory, parents categories will be automatically checked too. Currently, I can only choose one category from the CategoryChoiceTreeType field. Does it have a parameter or anything like this to make it work ? Tom. Link to comment Share on other sites More sharing options...
compsoul.dev Posted October 16, 2023 Share Posted October 16, 2023 (edited) $builder ->add('category_ids', CategoryChoiceTreeType::class, [ 'label' => 'Category', 'multiple' => true ]); https://devdocs.prestashop-project.org/8/development/components/form/types-reference/material-choice-tree/ Edited October 16, 2023 by compsoul.dev (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now