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.

Have Form Send Page Data

  1. I want to use a form to have users sign up for events. I would like to embed the form on the pages of a certain custom post type, with standard info that will be pre-populated based on the current logged in user meta, (name, address etc) I have created custom meta for all these options already.

    Is it possible to have the form, not only populate with the user data, but also with the post title and other post specific information? Some will be sent in "hidden" form fields for processing.

    Does this make sense? Thank you for any help.

    Posted 11 years ago on Saturday March 30, 2013 | Permalink
  2. It makes sense and is possible. Some of the merge tags are already available in the drop down. Add a hidden field to your form, then set the default value (on the advanced tab.) Use the merge tag drop down to select post ID or post title or any of the other available merge tags regarding the post:

    {embed_post:ID}
    {embed_post:post_title}
    {embed_post:post_author}

    You can also use {custom_field:[name]} where [name] is the custom field in which you have stored data about the post. If you had a custom field with a meta key of "zipcode" you could get that into your form by using this merge tag as a default value for a hidden field: {custom_field:zipcode].

    If you need something else added to your form related to the post, let us know what that is specifically and we will try to help you with a solution.

    Posted 11 years ago on Monday April 1, 2013 | Permalink
  3. Oh sweet, thanks big help!
    Now, is there a way to set a field to disabled/read only?

    Thanks!

    Posted 11 years ago on Monday April 1, 2013 | Permalink
  4. Please see this topic for an explanation of how to make a field read-only: http://www.gravityhelp.com/forums/topic/non-editable-text-field-request#post-151024

    It involves adding a custom CSS class to the field you want to disable (this is on the advanced tab of the field in the form builder) and then a small piece of jQuery added to the head of your page where the form is displayed.

    Posted 11 years ago on Monday April 1, 2013 | Permalink