Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
How does the form render? (what's the value of the action attribute).
I usually create a partial for my XForm:
@using EPiServer.XForms.Util
@model EPiServer.XForms.XForm
@Html.ValidationSummary()
@Html.DisplayForModel(new { XFormParameters = new XFormParameters { SuccessAction = "Success", FailedAction = "Failed", PostAction = "DoSubmit" } })
And then just include it using Html.RenderPartial:
<div class="span6 offset3" @Html.EditAttributes(m => m.CurrentPage.XForm)>
@{ Html.RenderPartial("_XFormPartial", Model.CurrentPage.XForm); }
</div>
Frederik
The action attribute looks like this,
/help-pages/new-user/XFormPost/?XFormId=a4cff1b7-89e9-4ec2-99ce-2e8786951153&postAction=XFormPost&postController=Standard&failedAction=XFormFailed&successAction=XFormSuccess
Any help with this?
I have no idea how to solve this and I could really need help from you EPi wizards. =)
Not sure if this will help.
[HttpPost]
public ActionResult XFormPost(XFormPostedData xFormPostedData)
{
return new _xFormPageUnknownActionHandler.HandleAction(this);
}
Any solution for this? also gets the following 404:
XFormPost/?XFormId=cea6ef99-cbbf-448d-977b-6ab22057410e&postAction=XFormPost&postController=&failedAction=Index&successAction=Index&contentLink=
We have upgraded to EpiServer 10.4.20, can we still use xforms?
Trying to post an XForm and all I'm getting is 404.
Trying to use code similar to what is found in this thread, http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=64533&pageIndex=2
// Controller public class StandardController : PageControllerBase<StandardPage> { private readonly XFormPageUnknownActionHandler _xFormPageUnknownActionHandler; public StandardController() { _xFormPageUnknownActionHandler = new XFormPageUnknownActionHandler(); } [HttpGet] public ActionResult Index(StandardPage currentPage) { return View(currentPage); } [HttpPost] public ActionResult XFormFailed(StandardPage currentPage, XFormPostedData xFormPostedData) { return View("Index", currentPage); } [HttpPost] public ActionResult XFormPost(XFormPostedData xFormPostedData) { return _xFormPageUnknownActionHandler.HandleAction(this); } [HttpPost] public ActionResult XFormSuccess(StandardPage currentPage, XFormPostedData xFormPostedData) { return View("Index", currentPage); } } // View @Html.PropertyFor(model => model.MainForm, new { XFormParameters = new XFormParameters { PostController = "Standard", SuccessAction = "XFormSuccess", FailedAction = "XFormFailed", PostAction = "XFormPost" } })
Could someone explain how the process of taking care of XForms works, so I understand it? It's hard to write code for things you don't know. =)