I'd like to use a bit of razor on the form thank you page to customize the message to include the form name so multiple forms can reuse the same thank you page.
Is it possible to get the form name from the recordid I have available at the thank you page. From a quick look it looks like I have the forms GUID but nothing else and I cant find anything in the documentation about retrieving form information.
For reference should anyone else need this I used the following:
var recordId = Request.QueryString["recordid"];
if (!string.IsNullOrEmpty(recordId))
{
using (var fs = new FormStorage())
{
Form f = fs.GetFormFromRecordId(new Guid(recordId));
@:Form submitted: @f.Name
}
}
You just need the following using statements to make this happy.
From RecordId to Form Name
I'd like to use a bit of razor on the form thank you page to customize the message to include the form name so multiple forms can reuse the same thank you page.
Is it possible to get the form name from the recordid I have available at the thank you page. From a quick look it looks like I have the forms GUID but nothing else and I cant find anything in the documentation about retrieving form information.
Any clues appreciated.
Thanks Simon
For reference should anyone else need this I used the following:
You just need the following using statements to make this happy.
@using Umbraco.Forms.Data.Storage
@using Umbraco.Forms.Core
is working on a reply...