Skip to main content

Getting Submitted Form Data in Umbraco Forms

With Umbraco Forms, you can configure a page to redirect the user to once a form has been submitted. A question came to me about how on that page we can get information about the form just submitted, as well as details of the record created from submission. I'll share the answer here for future reference.

We can make use of a couple of TempData values that are set automatically by Umbraco Forms (documentation here).

  • UmbracoFormSubmitted - The Guid of the Form
  • Forms_Current_Record_id - The Guid of the Record created from the form submission

The following code example, valid for Umbraco 8, shows how this data can be retrieved. For illustration purposes, I've implemented it directly in the template for the page the user is presented with after the form is submitted. For production code, likely this would be better in the controller of a hijacked route.