Copied to clipboard

Flag this post as spam?

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


  • Damon 217 posts 288 karma points
    Jul 26, 2018 @ 09:02
    Damon
    0

    Form comments submitted by user - how can you check which page it was submitted from

    Hi,

    we have news stories and under each is a form to allow user comments.

    When the user submits a comment it can then be approved in the back office.

    There are many news articles so how can you tell which page the comment came from? Can the database be queried for this?

    Thanks

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Jul 26, 2018 @ 14:49
    Marc Goodson
    0

    Hi Damon

    If you add a 'hidden field' to the form, in the form designer, and set a default value to be a 'magic string' see

    https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/Magic-Strings/

    Then the hidden field should be populated with the value when the form is posted back and you can see where it originated.

    For example, I think the magic string: [@url] would capture the url of the page the form was submitted on and [#pageName] would capture the name of the Umbraco node whichever is more useful.

    regards

    marc

Please Sign in or register to post replies

Write your reply to:

Draft