Copied to clipboard

Flag this post as spam?

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


  • FarmFreshCode 225 posts 422 karma points
    May 06, 2011 @ 16:59
    FarmFreshCode
    0

    Dynamic Doc2Form - Post to PageID

    Hello Everyone, 

    I am trying to include a Doc2Form in a template that I am planning on reusing in different sections of my website. Refer to the "creating an FAQ section" videos from Umbraco TV. When a user fills out the form, the form needs to create a child node of the page that the user filled it out on.

    So I need the Doc2Form to have a dynamic value for: ChooseWhereToStore="pageID"

    I was able to change the RedirectToNode variable and call the pageID via:

    <umbraco:Item field='pageID' runat='server'></umbraco:Item>

    but when I try to make the "ChooseWhereToStore" value dymanic, the form never creates any child nodes.  

    Here is the code for my form inside my template.

        <umbraco:Macro DocumentType="1737" Template="" TabName="job information" PageTabs="1" HideTabNames="1" ChooseWhereToStore="1735" EditMode="0" ShowTitle="1" TitleName="Job Title" SaveMemberAlias=", " ShowDescriptions="0" RequiredText="" SubmitButtonText="Submit Job Listing" PreviousButtonText="Previous" NextButtonText="Next" PublishOnSubmit="0" RefreshToParent="0" RedirectToNode="<umbraco:Item field='pageID' runat='server'></umbraco:Item>" PublishWithUserId="" StorePropertiesInCookies="" UseAjax="1" DefaultValueNode="" Alias="Doc2FormInput" runat="server"></umbraco:Macro>

    You'll notice that it is currently set to store everything on pageID = 1735... Has anyone made that dynamic before or know how I can make it happen?

    Currently using Umbraco v4.7
    Thanks

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    May 06, 2011 @ 17:08
    Ismail Mayat
    0

    have done it in the past try

    RedirectToNode=[#pageID]
  • FarmFreshCode 225 posts 422 karma points
    May 06, 2011 @ 17:22
    FarmFreshCode
    0

    Sorry, I already have the redirect to node value in my code... that seems to work with the dynamic value just fine

    But you are right... if I replace "1735" with

    "[#pageID]"

    Then it works great... thanks

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies