Copied to clipboard

Flag this post as spam?

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


  • Danine Noble 82 posts 368 karma points
    Mar 06, 2024 @ 23:36
    Danine Noble
    0

    Form Submission: Create Node Save Location

    Curious, how do you get a content node created by a form submission to be created (after approval) as a child item of the page that it was submitted under?

    Using any X-Path doesn't work; it places it in the root level of the content tree. I assume because at the time the form submission is being approved there's no page context.

    (using Umbraco Forms. Sorry! I was in the forms section so thought it would post there & not just general getting started @.@)

  • Danine Noble 82 posts 368 karma points
    Mar 08, 2024 @ 17:47
    Danine Noble
    100

    Well!

    I did some more perusing of the Umbraco documentation and found this gem: Working with Record Data! Figured I'd post here for anyone else that finds this in the future and this alternative works for them.

    Don't need to create content items and deal with the mystery of dynamic roots after form approval, or figuring out how to manage unpublished content nodes in the tree.

    Simply use the existing function to Get Approved Records From Form on Page and viola! Or any of the other ones that serve your purpose.


    This is especially great as I was nervous about using XPath since it's supposed to be removed in next Umbraco version but it's still the only option for Forms :(

Please Sign in or register to post replies

Write your reply to:

Draft