I want to show the submitted values to the user on the form success page, however I can’t figure out a good way to get the submitted form values in the response view. I’m on Umbraco forms and Umbraco version 13.
I can see the form id and record id in the TempData, but the only way i can figure out how to get the records field values from that is to load all records form the form and loop through them to find things. My forms have thousands of entries so loading all records takes a while.
The RecordReaderService is only returning a handful of total records (like i have 180 and it only sees 11), and even if it returned everything, doing a pagination look up still isn’t ideal.
Are there any other ways to get the Umbraco Forms submitted values on the success page of the site?
Though in the end decided hyjacking page view controllers, wasn’t all that extensible, so added a workflow that simply flagged the field that should be included in the tempData alongside the recordId/formId and overrode/hyjacked the UmbracoFormsController>OnFormHandled method
protected override void OnFormHandled(Form form, FormViewModel model)
{
if (_workflowService.Get(form).FirstOrDefault(x => x.WorkflowTypeId == AddToTempDataWorkFlowType.Guid) is not Workflow workflow)
{ return; }
…
[ADD extra to the tempData Here]
TempData["{ALIAS}"] = "{some values/serialised values}";
}
base.OnFormHandled(form, model);
}