Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Markup - Added form_token()
Browse files Browse the repository at this point in the history
WebVPF authored Mar 31, 2024
1 parent 8cdbb27 commit 53ff911
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions markup/functions/form.md
Original file line number Diff line number Diff line change
@@ -110,6 +110,20 @@ The above example would output as the following:
</form>
```

## form_token()

Outputs a `_token` hidden fields for CSRF protection.

```twig
{{ form_token() }}
```

The above example would output as the following:

```html
<input name="_token" type="hidden" value="...">
```

## form_submit()

Outputs an `input` element of type `submit`. This tag is generally available to provide consistency in usage.

0 comments on commit 53ff911

Please sign in to comment.