Outils | Formation en montage video

Formation en montage video

Dernière modification

Jan 31, 2025

A propos de l'outil

Creating Form Controls

Cake\View\Helper\FormHelper::control(string $fieldName, array $options = [])
  • $fieldName - A field name in the form 'Modelname.fieldname'.

  • $options - An optional array that can include both Options for Control, and options of the other methods (which control() employs internally to generate various HTML elements) as well as any valid HTML attributes.

The control() method lets you generate complete form controls. These controls will include a wrapping div, label, control widget, and validation error if necessary. By using the metadata in the form context, this method will choose an appropriate control type for each field. Internally control() uses the other methods of FormHelper.

Please note that while the fields generated by the control() method are called generically “inputs” on this page, technically speaking, the control() method can generate not only all of the HTML input type elements, but also other HTML form elements such as select, button, textarea.

By default the control() method will employ the following widget templates:

Cover image
Type de contenu Vidéo
Taille du fichier 0 Byte