From acf77762a8eb3f44ca3ecefa1b031f306ff11ea9 Mon Sep 17 00:00:00 2001 From: WebVPF <61043464+WebVPF@users.noreply.github.com> Date: Wed, 3 Apr 2024 20:26:14 +0300 Subject: [PATCH] Markup - Added form_token() and form_submit() (#184) --- markup/functions/form.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/markup/functions/form.md b/markup/functions/form.md index b0e10d22..841fc409 100644 --- a/markup/functions/form.md +++ b/markup/functions/form.md @@ -110,6 +110,34 @@ The above example would output as the following: ``` +## form_token() + +Outputs a `_token` hidden fields for CSRF protection. + +```twig +{{ form_token() }} +``` + +The above example would output as the following: + +```html + +``` + +## form_submit() + +Outputs an `input` element of type `submit`. This tag is generally available to provide consistency in usage. + +```twig +{{ form_submit() }} +``` + +The above example would output as the following: + +```html + +``` + ## Passing attributes to the generated element You can pass additional attributes to the `Form::open()` method by passing an array of attribute names and values to be rendered on the final generated `