Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jan Arenö 9 posts 40 karma points
    Apr 22, 2015 @ 11:55
    Jan Arenö
    0

    Surface Controller with step by step functions

    Hi

    I have an checkout process that's needs to be a step-by-step kind of function. My thoughts was to create a Surface Controller and have each step as a method. I found some guides using one method and a save feature, but I can't figure out how I should do if I want multiple steps with savings after each.

    Each step has a method in the surface controller like        

    [HttpGet]
    [ActionName("ContactInfo")]
    public ActionResult ContactInfo()
    and returns a partial view 
    return PartialView("ContactInfo", model);

     

    The view has a model @model CheckOut.ContactInfoModel

    and a form @using (Html.BeginUmbracoForm("ContactInfo", "OrderSurface", FormMethod.Post))

     

    I tried to create a macro and add the first page (a welcome page) and it worked. But when I post that and then render the contactinfo view there is a problem since it don't inherit Umbraco.Web.Models.RenderModel

    I have search to find a best practice but can't find any good solutions. Each step is idependent (display -> save) but I need to make sure it's in a certain order. 

    I have seen this post but then I have to create a umbraco page/node for each step and also a macro, is that the best way? Havn't worked with Umbraco for so long so I think I need some help making my decision.

     

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Apr 22, 2015 @ 18:23
Please Sign in or register to post replies

Write your reply to:

Draft