Copied to clipboard

Flag this post as spam?

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


  • hassanisback 8 posts 78 karma points
    Jan 02, 2018 @ 14:57
    hassanisback
    0

    Passing page info from footer

    Hi I am quite new in Umbraco. I have a footer containing the susbscription email field where user can put their email to subscribe. Now I would like to add a checkbox there. If the user check the box, I will send a demo product to that email. But for this I want to know from which page the user sending the mail from. Since the footer stands always the same, I need to link the page he is in with the footer to get the info. Lets say I have a product A page and product B page with same header and footer. Now if the user is in product A page and check the demo product request box, I will send him product A and so on. How can I dynamically pass the page id (?) to the footer, and send it along with the email adress to receiver (my mail)? Thanks in advance!

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Jan 09, 2018 @ 15:21
    Alex Skrypnyk
    100

    Hi Hassanisback

    It's pretty easy to do, easiest way to add hidden input field to the form with current Umbraco page value, like that:

    <input type="hidden" value="@Umbraco.AssignedContentItem.Id" name="submittedPageId" />
    

    Each submit you will get submittedPageId value.

    Thanks,

    Alex

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Jan 14, 2018 @ 20:40
    Alex Skrypnyk
    0

    Hi Hassanisback

    Did you solve the issue? Please, share with community/

    Oleksandr

  • hassanisback 8 posts 78 karma points
    Feb 08, 2018 @ 15:18
    hassanisback
    0

    Hi Alex This works, thanks a lot!

Please Sign in or register to post replies

Write your reply to:

Draft