November Happy Hour will be moved to Thursday December 5th.

Xforms - cannot send/store data and have thank you page at the same time

Vote:
 

We are using xforms. We used to have problems getting to the Thank you page. Now that's working. However, we have to choose between having the thank you page and get the data stored/sent. What has happened? Why cannot we do both things - have thank you page AND store/send?

#74184
Aug 22, 2013 8:45
Vote:
 

Both options are possible. Can you share some more info on error / issue description?

#74187
Aug 22, 2013 8:54
Vote:
 

This should work.

I've set it up in that way in a xform om epi7 locally.

#74200
Aug 22, 2013 12:46
Vote:
 

Hi, I have the same problem. I seem to have trouble sending form data.

When I create an XForm in Epi 7, I choose to have a thank you/confirmation page after clicking on the submit button. I also choose to get a confirmation email that will be sent after submitting the form.
The result is that I comes to the thank you page, but I dont get any confirmation email. Why?

Do I need to use an event trigger like AfterSubmitPostedData to send email after pressing the submit button? Or is there an easier way to get a confirmation email when using XForms?

#74208
Aug 22, 2013 13:39
Vote:
 

Actually me and Fredrik has the same issue but it's not the confirmation email (which is for the submitter) we're after really (even though that would be great). We need the data that we've submitted to either be sent in an email to a designated receiver OR have it stored in the Xforms to be picked up. Could anyone send an example of how the code for this is done? We are probably missing something out (especially since we even didn't get the Thank you page to work at all and then found out that code was missing). 

#74235
Aug 22, 2013 16:26
Vote:
 

If you use Episerver MVC Xform, then I can show my codes to you.

This is my question before:http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=73812

If you are using webforms,then try this:

http://www.frederikvig.com/2009/10/sending-confirmation-email-to-the-user-when-using-episerver-xforms/

#74441
Aug 28, 2013 3:39
Vote:
 

Super thanks, Martin! I'll check it out.

#74448
Aug 28, 2013 9:10
Vote:
 

In EPiServer.dll the following code exists in the class-file XFormSuccessActionResult.cs that contributes to the problem.

If the editor have an confirmation page, the Success method isn't invoked.

public override void ExecuteResult(ControllerContext context)
{
if (base.XForm.PageGuidAfterPost != System.Guid.Empty)
{
string mappedUrl = this.GetMappedUrl(base.XForm);
if (!string.IsNullOrEmpty(mappedUrl))
{
context.HttpContext.Response.Redirect(mappedUrl);
}
}
else
{
base.InvokeAction(context.Controller as Controller, context.HttpContext.Request.Params.get_Item("successAction"));
}
}
#121956
May 21, 2015 18:11
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.