Skip to content

Commit 808319d

Browse files
committed
Merge pull request #3029 from egeloen/f-valid-form-view
[Form] Add a 'submitted' attribute to the form view
2 parents bdd37ba + 3efd179 commit 808319d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

reference/forms/twig_reference.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ object:
295295
<?php echo $view['form']->get('name')->vars['label'] ?>
296296
</label>
297297

298+
.. versionadded:: 2.4
299+
The ``submitted`` variable was added in Symfony 2.4.
300+
298301
+-----------------+-----------------------------------------------------------------------------------------+
299302
| Variable | Usage |
300303
+=================+=========================================================================================+
@@ -310,6 +313,8 @@ object:
310313
| | since this only returns "global" errors: some individual fields may have errors |
311314
| | Instead, use the ``valid`` option |
312315
+-----------------+-----------------------------------------------------------------------------------------+
316+
| ``submitted`` | Returns ``true`` or ``false`` depending on whether the whole form is submitted |
317+
+-----------------+-----------------------------------------------------------------------------------------+
313318
| ``valid`` | Returns ``true`` or ``false`` depending on whether the whole form is valid |
314319
+-----------------+-----------------------------------------------------------------------------------------+
315320
| ``value`` | The value that will be used when rendering (commonly the ``value`` HTML attribute) |

0 commit comments

Comments
 (0)