Copied to clipboard

Flag this post as spam?

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


  • Stuart Mullinger 3 posts 73 karma points
    Dec 17, 2015 @ 09:27
    Stuart Mullinger
    0

    Umbraco Forms with Custom Controller and RTE

    Hi,

    I'm having a problem with the "thank you" and validation messages not showing on a form when it is on a template that uses a custom controller and the form is entered as a macro in the rich text editor.

    I created a new, empty site to test and have found the following.

    1. Where the template inherits from "Umbraco.Web.Mvc.UmbracoTemplatePage" everything works well, regardless of whether the form is inserted directly as a macro on the template, or as a macro within the rich text editor.
    2. Where the template uses a custom controller it all works well if the form is inserted directly as a macro on the template.
    3. Where the template uses a custom controller and the form is inserted as a macro in the rich text editor then there are no validation or "thank you" messages shown on the form when it is submitted. It just reloads the form, with the fields set back to empty.

    So, the following code in the template will not work (where the text field is an RTE with a form macro inserted into it):

    @inherits Umbraco.Web.Mvc.UmbracoViewPage<MainPage>
    ...
    <body>
    @Html.Raw(@Umbraco.Field("text"))
    </body>
    ...
    

    Whereas, this code will work:

    @inherits Umbraco.Web.Mvc.UmbracoViewPage<MainPage>
    ...
    <body>
    @Umbraco.RenderMacro("FormsRenderForm", new {FormGuid="541846c9-cda8-4cb2-91dc-f79aefdf1a94"})
    </body>
    ...
    

    I'm a bit stuck with this one, and would really appreciate any help anyone can give.

    Umbraco version: 7.3.0. Umbraco Forms version: 4.1.4

    Thanks, Stuart.

    Edit: forgot to mention that the form data is saved in the back office successfully, even if the "thank you" message is not shown.

  • Stuart Mullinger 3 posts 73 karma points
    Jan 15, 2016 @ 16:18
    Stuart Mullinger
    0

    Just in case anyone comes across this I did find that the following helped with the validation and may be useful. I've logged an issue with the forms team and will update here when I hear anything.

    Prepping Frontend for Umbraco Forms

  • Warren Buckley 2085 posts 4511 karma points MVP 6x admin hq c-trib
    Jan 18, 2016 @ 21:34
    Warren Buckley
    1

    Hello Stuart,
    I have recently joined the Umbraco HQ to help work on the Umbraco Forms product. There is an issue in the issue tracker for this here that I have recently looked into last week - http://issues.umbraco.org/issue/CON-762

    However when doing the research & investigation into this, it is more of a wider problem in the Umbraco Core product as opposed to anything specific with the Umbraco Forms product - http://issues.umbraco.org/issue/U4-7708

    I have raised the issue with my colleagues on the Core team, who will prioritize the bug in their backlog.

    Many Thanks,
    Warren

  • Pedro Fonseca 2 posts 71 karma points
    Apr 28, 2017 @ 16:37
    Pedro Fonseca
    0

    Is this solved?

    I have Umbraco 7.5.7 with Umbraco Forms 4.4.2. In the configured workflow for the Form, the Submit Message never works. If I use the Redirect to Page link it works.

    When I configure the workflow with the Submit Message, it redirects always to a blank page. Then if I press Previous in the browser it shows the form with the Submit Message.

    Can anybody help me out?

    Submit Message = Message on Submit property...

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft