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.

gravity forms fields into single.php

  1. Hey guys!

    I created a form. I added the required fields Name, Email, Phone and Drop Down. Now I'm interested in display this data in the single.php of Wordpress, because every post in my blog should include this. I know: I've create Php-tags like this in my editor: <?php the_tags('',' , ',''); ?> But where I can find this tags for my fields?

    Thanks a lot.

    Posted 14 years ago on Thursday October 15, 2009 | Permalink
  2. You can insert a form into a WordPress theme template using a function call.

    If you go to the "Help" page under the "Forms" navigation item that Gravity Forms adds to WordPress, you will see an example and instructions for using the function call.

    It looks like this:

    <?php gravity_form(2, false, false); ?>

    Parameter 1 (id): (Required) The id of the form to be embedded

    Parameter 2 (title): (Optional) Whether or not do display the form title. Defaults to 'false'

    Parameter 3(description): (Optional) Whether or not do display the form description. Defaults to 'false'

    Posted 14 years ago on Thursday October 15, 2009 | Permalink
  3. Thanks!

    But I made a mistake in this posting, sorry: I don't want to integrate a form in my page, i want to integrate the datas of the form which are defined by the user who submit the form. Example: The user could publish a blog entry by my form. For this he have to define the fields Name, Email, Phone and a Drop Down List with some opions. This datas i want to include in his blog post (single.php).

    Thanks,
    michael

    Posted 14 years ago on Thursday October 15, 2009 | Permalink
  4. Only the post fields create post data. The Standard and Advanced fields do not create post related data because Posts in WordPress. So using the Name, Email, Phone and Drop Down fields will not create post related data.

    You have to use the Post Fields (Title, Body, Custom Field, etc.) to create posts.

    You would have to use Custom Fields for Name, Email, Phone, etc. Drop Downs aren't available for Custom Fields, only text inputs. Although we plan on expanding the Custom Field functionality in the next release.

    Otherwise you would have to write custom PHP to read data from the Gravity Forms database tables to display them in your single.php file, but this would require PHP and MySQL knowledge to pull this information in dynamically. It's possible to do, but Gravity Forms doesn't have a function call for this. You would have to write it yourself.

    Posted 14 years ago on Thursday October 15, 2009 | Permalink
  5. thegreenpages
    Member

    Hi Carl, I would love to see this expanded in the Custom Field functionality as well. Keep up the great work.

    Posted 14 years ago on Monday January 4, 2010 | Permalink