PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Get page ID from form submissions

  1. Hi!

    I will MAYBE start a site that will rent out houses. And my plan is to make a form and then put this form in a widget. The widget will be seen on every property page and when a person submit to the form they are most likely intresting in the property at the page they aree viewing.
    The problem is that I cant know what property the person is intrested in.

    So my question is: Is it possible to make have only one form that knows wich page and property it was sumitted on?

    The user would not see this, but in the mail back to me I would see the page link, ore the page ID on wich the form was submitted. So one form, but different page IDs depending on wich page the form is from.

    Is it possible ore is it a custom work, and if so, would it be a lot of work?

    //Kim

    Posted 13 years ago on Monday April 23, 2012 | Permalink
  2. In the entry detail there is an embed URL that should signify which page it came from. However, you could also use dynamic population to pre-populate a field with some data related to the page that passes to the form.

    Posted 13 years ago on Monday April 23, 2012 | Permalink
  3. David Peralty

    You can definitely do this.

    First create an input field that is hidden.
    Then look at this documentation:
    http://www.gravityhelp.com/documentation/page/Gform_field_input

    Basically, you'll need to write a PHP script to grab the current page URL.
    See:
    http://wordpress.org/support/topic/current-page-url-1

    Then you'll want to pass that current page URL back to the form, putting the value in the hidden input field.

    Let me know if that helps.

    Rob's way is easier though. :)

    Posted 13 years ago on Monday April 23, 2012 | Permalink
  4. Aha so then I can pre-populate the form with maybe the propert ID name?
    And this will happen automatically for every page?

    If so it would be awesome!

    Posted 13 years ago on Monday April 23, 2012 | Permalink
  5. David Peralty

    Check out Rob's way first though as this data is already being "recorded". Go to your Entries screen and click edit. You can then select Source Url as one of the things to display. :)

    Posted 13 years ago on Monday April 23, 2012 | Permalink
  6. For know I just wonder if it is possible so you have been most helpful!
    Thanks!

    Posted 13 years ago on Monday April 23, 2012 | Permalink
  7. No problem, we're glad to help!

    Posted 13 years ago on Monday April 23, 2012 | Permalink

This topic has been resolved and has been closed to new replies.