Return to v2.5.0 docs

authenticityTokenField()


View Helpers General Form Functions string controller


Returns a hidden form field containing a new authenticity token.

<!--- Needed here because we're not using `startFormTag`. --->
<form action="#urlFor(route='posts')#" method="post">
  #authenticityTokenField()#
</form>
  
<!--- Not needed here because we're not POSTing the form. --->
<form action="#urlFor(route='invoices')#" method="get">
</form>

Related Functions

General Form Functions