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.

Include information from page in widget form submission

  1. I have a site with 45 properties and would like to include a contact form in the sidebar to appear beside each property. I would like some information about the property included in the form submission, like the property name (post title). So, instead of the form having a field "What property are you inquiring about?" and asking the visitor to add it in, the notification would include some details about the property (like the name [post title] or URL.) Seems like the embed URL should at least be available.

    I could do it with the query string if I sent them from the property post to the contact form page (and just passed the values) but I have space in the sidebar for a form on each property and it makes sense for me to include the form there. The submission just needs to contain some information about the property that was being viewed. At a minimum I would like to know what property the visitor is inquiring about, in the admin notification, but if more is possible, I'd like to know how to do that as well. Like maybe I could say something like "Thank you for your interest in THIS PROPERTY" up front, so they know they don't need to repeat that in their inquiry.

    Site not done, but live enough:

    I thought I remembered a topic here that dealt with the information the widget form has access to, but I cannot locate it. I'm using the Gravity Forms widget, WordPress 3.1.1 and Gravity Forms

    Thank you.

    Posted 12 years ago on Friday April 22, 2011 | Permalink
  2. In my testing, using the form field variables in the default value field worked fine with the form widget in a sidebar. It was able to populate the page id, page title, page URL, etc. without a problem.

    See this screenshot showing a post with the form in a sidebar widget to the right, I added a field for each of the form field variables and they all populated as intended:

    So it should work. The one place it will have a problem is if it's on a sidebar on an archive page where multiple posts are being displayed. But if it's on a sidebar on a single post page it should be fine.

    Posted 12 years ago on Friday April 22, 2011 | Permalink
  3. Thanks Carl. Worked perfectly

    Posted 12 years ago on Saturday April 23, 2011 | Permalink

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