Copied to clipboard

Flag this post as spam?

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


  • Tim 174 posts 398 karma points
    Mar 22, 2013 @ 08:36
    Tim
    0

    How to reshow the page on invalid form submission

    I'm just trying to wrap my head around the MVC integration and need to handle failed form submissions. 

    I've setup Umbraco so we have a similar structure to what's discussed here: http://our.umbraco.org/Documentation/Reference/Mvc/custom-controllers however when I post back, what do I return to display the current page and errors.

    At the moment I've tried CurrentTemplate, View and base.Index() but none allow me to return the form with errors (it just re-renders the Action rather than the page with the Action).

    Any ideas?

  • gary 385 posts 916 karma points
    Mar 22, 2013 @ 21:13
    gary
    0

    Hi Tim

    Dan Diplo made a great contact form package, your answer is in there.

    Dan uses a section of the form to return errors, but you will see for yourself. 

    http://our.umbraco.org/projects/website-utilities/diplo-razor-form

    Hope it helps G

Please Sign in or register to post replies

Write your reply to:

Draft