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.

Capture and Displaying Posts

  1. I've just bought Gravity forms and I'm new to WordPress - I have created a small form that has 2 fields ('Subject' and 'Details' edit controls, + 'Submit' button) - this form sits as a widget on my pages. The idea is that if I want to quickly type in some notes and save them as draft I can use this form.

    Having typed in my data I see the data that I entered in the 'Forms: Entries' administrator page, but what I want to do is create another widget where I can quickly scroll through these 'quick' posts, read-only, and then have a button to delete each post. This should sit on a user page or dialog, and not on the admin page.

    Can someone help me to get started on this? If someone could tell me how to grab hold of each post entry and then display each post in readonly format then I can carry on from there. At the moment I'm a bit stuck as to how to get started.

    Thanks.

    Posted 7 years ago on Wednesday September 5, 2012 | Permalink
  2. When you say "each post entry" you mean each post which was created with this form? You will need to have them in some category or tagged or otherwise identified in some way, so you can retrieve them all. If you did that, with a category, you could use this plugin (List Category Posts): http://wordpress.org/extend/plugins/list-category-posts/

    That would give you a list of posts. If you are logged in, clicking on the post will bring up the post and normally the template includes the edit functionality. You can add this to your template file to offer a "Delete" button on the front end when logged in and viewing a post:

    [php]
    <?php if (current_user_can('edit_post', $post->ID))
        echo "<a href='" . wp_nonce_url("/wp-admin/post.php?action=delete&post=$id", 'delete-post_' . $post->ID) . "'>Delete</a>" ?>

    The post would not be read only. And the list of posts in the widget would be titles only. That plugin does offer a templating system, so you might be able to modify the output to display a post title and a snippet.

    This is a customization which is beyond the support we can provide here. Maybe these hints have helped you? If not, you might want to post a job on our job board. http://www.gravityhelp.com/forums/forum/job-board

    Posted 7 years ago on Wednesday September 5, 2012 | Permalink
  3. Thanks Chris, I'll give this a go - are you saying that it is not possible at all to create readonly fields in either WordPress or Gravity Forms, or is this one of the customisation items that is beyond this forum?

    Posted 7 years ago on Wednesday September 5, 2012 | Permalink
  4. I'm not certain how read only comes into play. What are you displaying (you said fields?) that needs to be marked read only?

    Posted 7 years ago on Wednesday September 5, 2012 | Permalink