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.

Generate post from forms, how to get the image

  1. linusrocks
    Member

    Hey, I'm trying to use GF to generate a post when a form is completed.
    The custom fields are working fine but when i try to use a "Image" field I don't understand where is the data and what am i supposed to do to use it.
    Is that the post thumbnail feature introduced in wordpress 2.9?
    If it's not I might suggest to implement it, since it seems useful.

    I need a way to display an image uploaded into a form in the post just like i do with custom fields:
    <?php if (get_post_meta($post->ID, 'contatto', true) != ""): ?> <p>Contatto: <?php echo get_post_meta($post->ID, 'contatto', true) ?></p> <?php endif; ?>

    Posted 14 years ago on Monday August 2, 2010 | Permalink
  2. The Post Image data is stored in your Media Library and added to the Gallery for that post.

    Currently the only way to add this automatically to a post is to use a hook to append it to the post data using the Gallery tag. You can also edit your theme template file and add the Gallery output to the theme file itself.

    We are working on enhancing the Post Body functionality for the 1.3.14 release so you can format the Post Body content and insert ANY form field value (images included) directly in to the Post Body content. It is going to make it much easier to accomplish what you want to do without using hooks. It will allow you to insert form field values and uploaded images into your post body with ease.

    We will be releasing a beta of 1.3.14 within the next week and a half or so.

    Posted 14 years ago on Monday August 2, 2010 | Permalink
  3. jcollier
    Member

    Thank you, in advance, for adding this function to 1.3.14. Another excellent improvement.

    Posted 14 years ago on Thursday August 5, 2010 | Permalink
  4. gwc_wd
    Member

    Carl, If I understand what you plan, it is going to make GF the most important part of the toolkit.

    Two things I want to do using GF:

    1. Maintain a business directory.

    Building the input side with GF is sweet and easy with the Advanced Fields. But trying to decide how to output that information for user view is not so easy.

    Will I be able to use short codes to insert any field into the body of a post?

    2. Same deal, different data. A web directory where users can fill out a form with name, URL and description and have it added to the list that is publicly viewable.

    If there was a shortcode I could just publish a page with the appropriate field shortcodes and job done.

    In the meantime, take pitty on a doddering old guy and point me at where I find the information on editing template files to display GF fields by editing the php template files? I see linusrocks above is doing that but I haven't found where to look to do it myself.

    All I really need is something that GF already does natively but I don't know how to harness. The View Entries function displays a list of entries -- exactly what I want to do. Then clicking on any entry displays the completed data fields. Exactly what I want to do.

    Even the styling is appropriate to my needs.

    I see entry_list.php and entry_detail.php used to generate the Entries list and the individual entries pages in admin Perhaps I can hack them to display publicly rather than just to admin, requiring removal of edit/delete code and just copy the code into a new template file?

    Posted 14 years ago on Friday August 6, 2010 | Permalink
  5. @gwc_wd If you want to display additional fields in your theme template files right now you can edit you can use the Post Custom Field and then in your theme you would output the Custom Fields. This is a built in WordPress feature. You can only output Custom Fields this way, not all of the non-Post fields that Gravity Forms can do.

    You can read more about Custom Fields here:

    http://codex.wordpress.org/Custom_Fields

    But as I mentioned we are adding the ability to control the Post Body and insert field values into it. This won't be done via shortcodes, but via our field variables similar to how you create a Notification. Then these variables are replaced with the field value and the post is created.

    Posted 14 years ago on Friday August 6, 2010 | Permalink
  6. gwc_wd
    Member

    Perfect.

    Posted 14 years ago on Friday August 6, 2010 | Permalink
  7. Hey GWC, if you want to populate a custom field with the URL from the post image field, I've posted a solution in this topic: http://forum.gravityhelp.com/topic/save-image-field-and-post-title-also-as-custom-fields

    Posted 14 years ago on Saturday August 7, 2010 | Permalink
  8. gwc,

    Can you share your website with me..... as it seems we both are trying to do the same thing.

    And Carl, I am having a hard time finding documentation on how to use Gravity Forms so that my site users can create their own "business profile" in a directory I am hoping to set up.

    Can you point me in that direction please?

    Thanks

    Posted 14 years ago on Saturday August 14, 2010 | Permalink
  9. Dale, I answered your documentation question at the other topic you started.

    http://forum.gravityhelp.com/topic/need-help-in-creating-a-business-directory-of-sorts?replies=2#post-8573

    Posted 14 years ago on Saturday August 14, 2010 | Permalink