Copied to clipboard

Flag this post as spam?

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


  • Matthias Bier 30 posts 90 karma points
    Sep 10, 2015 @ 10:44
    Matthias Bier
    0

    Display submitted Form Data on Thank you page

    Hi!

    After upgrading to Umbraco 7.2.8 and Umbraco Forms I don't see how I can display data from the submitted record on the Thank you page.

    With Umbraco 4 I used to have a XSLT Macro on the Thank you page that got the record-id from the QueryString and then displayed the record data.

    Can I do the same with the new Umbraco Forms? The record-id is not in the QueryString anymore - Is there another way to get the record-id of the just submitted record?

    I tried accessing TempData collection in the Partial View Macro Page file but it's empty.

    Thanks for any hint

    Matthias

  • Comment author was deleted

    Sep 10, 2015 @ 11:02

    Yup it should be in the tempdata collection, will check for the key

  • Matthias Bier 30 posts 90 karma points
    Sep 10, 2015 @ 12:39
    Matthias Bier
    0

    To me it seems as if TempData is completely empty. This code just shows nothing...

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @using Umbraco.Forms.Mvc.DynamicObjects
    
    
    <div class="contact_request_summary">
    
    </div>
    @foreach (var key in TempData.Keys){
        <span>@key.ToString()</span>
    }
    

    I guess the TempData content is lost when redirecting to the Thank you page. Or should it survive the redirect?

  • Comment author was deleted

    Sep 10, 2015 @ 12:53

    Hmm should work, I'll do a test and get back to you in a couple of minutes

  • Matthias Bier 30 posts 90 karma points
    Sep 11, 2015 @ 11:54
    Matthias Bier
    0

    One amendment: The macro is inside a Webforms template, not inside a MVC template.

    I saw the issue CON-774 which I also experience in my installation - perhaps this is related?

  • Matthias Bier 30 posts 90 karma points
    Sep 14, 2015 @ 11:32
    Matthias Bier
    0

    Did a quick test on my side regarding items in the tempdata collection:

    1. Thankyou-Page Macro inside MVC template page

      • Submit form on Webforms page: FormsCurrentRecord_id

      • Submit form on MVC template page: UmbracoForms, FormsCurrentRecord_id

    2. Thankyou-Page Macro inside Webforms page

      • Submit form on Webforms page: N/A
      • Submit form on MVC template page: N/A

    Only MVC template page for form and Thankyou-page seems to work properly.

Please Sign in or register to post replies

Write your reply to:

Draft