I'm trying to partiallysubmit a multi step form with following code. But it does not save current step details, saves only upto the last step. Any help for this please.
CMS Version: 4.8
Contour version: 1.1.12
FormStorage formStorage = new FormStorage(); //local code Form form = formStorage.GetForm(new Guid("d7aca7dc-6f51-48df-85c3-da41dcfc4366")); RecordService recordService = new RecordService(form); recordService.Open(); var cookieName = RecordService.GetCookieReference(form); HttpCookie myCookie = HttpContext.Current.Request.Cookies[cookieName]; if (myCookie != null) { var ss = myCookie.Value; var record = recordStorage.GetRecord(new Guid(ss)); recordService.SaveFormToRecord(); recordService.NextPage(); recordStorage.UpdateRecord(record, form); recordStorage.UpdateRecordXml(record, form); recordService.SaveFormToRecord(); recordStorage.Dispose(); recordService.Dispose(); umbraco.library.RefreshContent(); }
Partially Submit a form using a Usercontrol
I'm trying to partiallysubmit a multi step form with following code. But it does not save current step details, saves only upto the last step. Any help for this please.
CMS Version: 4.8
Contour version: 1.1.12
Comment author was deleted
Hey,
Looks like you aren't setting any record field values so will only store an empty record..
Thank you Tim,
I thought following lines will automatically set values to the record. Do I need to set them manually?
Could you please post a code sample if you have
I tried this but it didnt save value.
record.GetRecordField("TestFiles").Values.Add("Test Field Value");
Comment author was deleted
Check the code for RestContour that creates and stores records http://contourcontrib.codeplex.com/SourceControl/latest#Contour.Contrib/Cultiv.RestContour/SubmitContourForm.cs
Thank you for the sample code Tim,
Unfortunately it did not work for me because HttpContext.Current.Request[field.Caption] ?? ""; returns empty string all the time.
I could complete my task if I know the code they use for 'Next' button in multi step form.
is working on a reply...