Generate HTML Anti Forgery token in custom form

Topics: Core, General
Dec 7, 2015 at 8:39 PM
Hey guys,

I'm overriding the entire HTML of a custom form widget with a file called Widget.NewsletterSignups.

How do I generate the HTML anti forgery token dynamically for this form?

Many thanks!
Dec 8, 2015 at 9:09 PM
Edited Dec 8, 2015 at 9:09 PM
I solved this by simply including @Html.AntiForgeryTokenOrchard() within the form template override.

Such as:

<!-- divs and inputs here -->

Marked as answer by Makedonian on 12/8/2015 at 2:09 PM