Once an Umbraco Form submits and redirects to a thank you page, how on earth does one go about accessing the record that was just submitted?
TempData contains two keys - UmbracoForms which I think is a list of form GUIDs and Forms_Current_Record_id which contains the current record's GUID. The last one is great but how do I access it? Can't find anything in the docs, am I blind.
P.S there was this unresolved thread as well with no solution. Talked of custom workflows though, so was unsure if I should bump it.
EDIT: And apparently umbracoformsform used to also be a TempData key containing the current form but apparently is no longer there.
Sorry if I'm missing the basis of your question as I'm not a tech person.
But... if you are just trying to view the submitted form values, within the Form ribbon item, click on the arrow to the left of the form name. The Entries folder will then appear.
The Recordservice is now ( umb v8.1 / forms v8.1.1) an interface.
MickTemp did you ever succeed at displaying the data on the thank you page without maken a custom workflow?
Yes, I ended up doing something like this in a view for Umbraco 7, given a known form Guid. Not proud of it but I ran out of time.
I haven't touched Umbraco 8 yet so not sure how to adapt this if RecordService is now an interface. We also don't use Umbraco Forms anymore after this, sorry I can't be of more help.
Guid formGuid = new Guid("xxxxxx-xxxx-xxxx-xxxx-xxxxxxx");
Record formRecord;
using (var fs = new FormStorage())
{
var form = fs.GetForm(formGuid);
using (RecordStorage storage = new RecordStorage())
{
formRecord = storage.GetAllRecords(form).Where(r => r.UniqueId.ToString() == TempData["Forms_Current_Record_id"]).FirstOrDefault();
}
}
Getting a form record on thank you page
Once an Umbraco Form submits and redirects to a thank you page, how on earth does one go about accessing the record that was just submitted?
TempData
contains two keys -UmbracoForms
which I think is a list of form GUIDs andForms_Current_Record_id
which contains the current record's GUID. The last one is great but how do I access it? Can't find anything in the docs, am I blind.P.S there was this unresolved thread as well with no solution. Talked of custom workflows though, so was unsure if I should bump it.
EDIT: And apparently
umbracoformsform
used to also be a TempData key containing the current form but apparently is no longer there.Hi,
Sorry if I'm missing the basis of your question as I'm not a tech person.
But... if you are just trying to view the submitted form values, within the Form ribbon item, click on the arrow to the left of the form name. The Entries folder will then appear.
Hi,
I can't remember the name space but you use the RecordService
Hope you find it Matt
Hi,
The Recordservice is now ( umb v8.1 / forms v8.1.1) an interface. MickTemp did you ever succeed at displaying the data on the thank you page without maken a custom workflow?
thanks,
Gerty
Hi Gerty,
Yes, I ended up doing something like this in a view for Umbraco 7, given a known form Guid. Not proud of it but I ran out of time.
I haven't touched Umbraco 8 yet so not sure how to adapt this if RecordService is now an interface. We also don't use Umbraco Forms anymore after this, sorry I can't be of more help.
is working on a reply...