Copied to clipboard

Flag this post as spam?

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


  • Ollie Philpott 5 posts 25 karma points
    Jul 09, 2014 @ 19:07
    Ollie Philpott
    0

    Adding a form as a macro in a RTE with MVC

    I have created a macro that can be used in a rich text editor that inserts a form into a page. The form is rendered using Html.Action.

    If there is a server side validation error, I add an error to the ModelState and use return CurrentUmbracoPage(), but this doesn't work - the validation message is not displayed and the form is shown in the initial blank state.

    Similarly, after a successful POST, I set a variable in TempData and use return RedirectToCurrentUmbracoPage(). The page redirects but the TempData is empty.

    What is happening? Is it something to do with how macros are rendered in rich text editors? How can I fix it?

Please Sign in or register to post replies

Write your reply to:

Draft