@@ -319,59 +319,59 @@ object:
319
319
+------------------------+-------------------------------------------------------------------------------------+
320
320
| Variable | Usage |
321
321
+========================+=====================================================================================+
322
- | ``form `` | The current ``FormView `` instance |
322
+ | ``form `` | The current ``FormView `` instance. |
323
323
+------------------------+-------------------------------------------------------------------------------------+
324
- | ``id `` | The ``id `` HTML attribute to be rendered |
324
+ | ``id `` | The ``id `` HTML attribute to be rendered. |
325
325
+------------------------+-------------------------------------------------------------------------------------+
326
326
| ``name `` | The name of the field (e.g. ``title ``) - but not the ``name `` |
327
- | | HTML attribute, which is ``full_name `` |
327
+ | | HTML attribute, which is ``full_name ``. |
328
328
+------------------------+-------------------------------------------------------------------------------------+
329
- | ``full_name `` | The ``name `` HTML attribute to be rendered |
329
+ | ``full_name `` | The ``name `` HTML attribute to be rendered. |
330
330
+------------------------+-------------------------------------------------------------------------------------+
331
331
| ``errors `` | An array of any errors attached to *this * specific field |
332
332
| | (e.g. ``form.title.errors ``). |
333
333
| | Note that you can't use ``form.errors `` to determine if a form is valid, |
334
334
| | since this only returns "global" errors: some individual fields may have errors. |
335
335
| | Instead, use the ``valid `` option. |
336
336
+------------------------+-------------------------------------------------------------------------------------+
337
- | ``valid `` | Returns ``true `` or ``false `` depending on whether the whole form is valid |
337
+ | ``valid `` | Returns ``true `` or ``false `` depending on whether the whole form is valid. |
338
338
+------------------------+-------------------------------------------------------------------------------------+
339
- | ``value `` | The value that will be used when rendering (commonly the ``value `` HTML attribute) |
339
+ | ``value `` | The value that will be used when rendering (commonly the ``value `` HTML attribute). |
340
340
+------------------------+-------------------------------------------------------------------------------------+
341
- | ``read_only `` | If ``true ``, ``readonly="readonly" `` is added to the field |
341
+ | ``read_only `` | If ``true ``, ``readonly="readonly" `` is added to the field. |
342
342
+------------------------+-------------------------------------------------------------------------------------+
343
- | ``disabled `` | If ``true ``, ``disabled="disabled" `` is added to the field |
343
+ | ``disabled `` | If ``true ``, ``disabled="disabled" `` is added to the field. |
344
344
+------------------------+-------------------------------------------------------------------------------------+
345
345
| ``required `` | If ``true ``, a ``required `` attribute is added to the field to activate HTML5 |
346
346
| | validation. Additionally, a ``required `` class is added to the label. |
347
347
+------------------------+-------------------------------------------------------------------------------------+
348
- | ``max_length `` | Adds a ``maxlength `` HTML attribute to the element |
348
+ | ``max_length `` | Adds a ``maxlength `` HTML attribute to the element. |
349
349
+------------------------+-------------------------------------------------------------------------------------+
350
- | ``pattern `` | Adds a ``pattern `` HTML attribute to the element |
350
+ | ``pattern `` | Adds a ``pattern `` HTML attribute to the element. |
351
351
+------------------------+-------------------------------------------------------------------------------------+
352
- | ``label `` | The string label that will be rendered |
352
+ | ``label `` | The string label that will be rendered. |
353
353
+------------------------+-------------------------------------------------------------------------------------+
354
354
| ``multipart `` | If ``true ``, ``form_enctype `` will render ``enctype="multipart/form-data" ``. |
355
355
| | This only applies to the root form element. |
356
356
+------------------------+-------------------------------------------------------------------------------------+
357
- | ``attr `` | A key-value array that will be rendered as HTML attributes on the field |
357
+ | ``attr `` | A key-value array that will be rendered as HTML attributes on the field. |
358
358
+------------------------+-------------------------------------------------------------------------------------+
359
- | ``label_attr `` | A key-value array that will be rendered as HTML attributes on the label |
359
+ | ``label_attr `` | A key-value array that will be rendered as HTML attributes on the label. |
360
360
+------------------------+-------------------------------------------------------------------------------------+
361
361
| ``compound `` | Whether or not a field is actually a holder for a group of children fields |
362
- | | (for example, a ``choice `` field, which is actually a group of checkboxes |
362
+ | | (for example, a ``choice `` field, which is actually a group of checkboxes. |
363
363
+------------------------+-------------------------------------------------------------------------------------+
364
- | ``block_prefixes `` | An array of all the names of the parent types |
364
+ | ``block_prefixes `` | An array of all the names of the parent types. |
365
365
+------------------------+-------------------------------------------------------------------------------------+
366
- | ``translation_domain `` | The domain of the translations for this form |
366
+ | ``translation_domain `` | The domain of the translations for this form. |
367
367
+------------------------+-------------------------------------------------------------------------------------+
368
- | ``cache_key `` | A unique key which is used for caching |
368
+ | ``cache_key `` | A unique key which is used for caching. |
369
369
+------------------------+-------------------------------------------------------------------------------------+
370
- | ``data `` | The normalized data of the type |
370
+ | ``data `` | The normalized data of the type. |
371
371
+------------------------+-------------------------------------------------------------------------------------+
372
- | ``method `` | The method of the current form (POST, GET, etc.) |
372
+ | ``method `` | The method of the current form (POST, GET, etc.). |
373
373
+------------------------+-------------------------------------------------------------------------------------+
374
- | ``action `` | The action of the current form |
374
+ | ``action `` | The action of the current form. |
375
375
+------------------------+-------------------------------------------------------------------------------------+
376
376
377
377
.. _`form_div_layout.html.twig` : https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
0 commit comments