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.

Auto-populate the name of the Post title

  1. I'm building a website for a client who rents RV's and currently has a fleet of various sizes. I would like to place a form on each RV page that a visitor could request more info on. Would it be possible to have the name of the "Post", which will be the name and style of the RV for rent, to auto-populate a field in the form located on the page, so when submitted, my client knows exactly which one they are referring to? I noticed the post at http://www.gravityhelp.com/forums/topic/automatically-populate-a-dropdown-with-post-titles which is a little similar except that I don't need it as a drop-down.

    Thank you for your help.

    Thank you.

    Posted 12 years ago on Wednesday October 12, 2011 | Permalink
  2. The embed URL of where the form is submitted from is already captured with the form submission and available in the right sidebar when viewing an entry.

    If you want this information to also populate a hidden field on your form so that it's included with the form fields but the user doesn't see it... that is easy to do.

    - Add a Hidden Field to your form
    - Edit the Hidden Field and give it a field label of whatever you want to call this "RV Name" for instance
    - Select the Advanced tab when editing the Hidden Field
    - For the Default Value select "Embed Post/Page Title"
    - It will insert the merge tag for this into the Default Value
    - See this screenshot: http://i.imgur.com/XuIdI.png
    - Save your form

    This will now save the post title as a hidden field on your form automatically.

    There are all sorts of merge tags available when populating a default value like this. A few of them are available in the drop down and then there are more advanced options for inserting the value of user data as well as post custom field data.

    Merge tags are documented here:

    http://www.gravityhelp.com/documentation/page/Merge_Tags

    The easiest way to get to know some of these features is just to create some test forms and play around with it.

    Posted 12 years ago on Wednesday October 12, 2011 | Permalink

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