Extending the Category form in creation mode
In the Presenting the most useful hooks to extend a form and handle it section, we saw that we can use the actionCategoryFormBuilderModifier
hook to enable our module to add the three fields to our form. The corresponding hookActionCategoryFormBuilderModifier($params)
function can initially be defined as follows:
public function hookActionCategoryFormBuilderModifier($params) { $formBuilder = $params['form_builder']; $formBuilder->add('short_text', TranslatableType::class, [ 'type' => TextType::class, 'label' => $this->trans('Short text field extension', [], 'Modules.WHCategoryFields.Admin'), 'help' => $this->trans('Throws error if length is > 255', [],'Modules.WHCategoryFields.Admin&apos...