Title: [Plugin: Gravity Forms &#8211; Update Post] Creates a new entry
Last modified: August 20, 2016

---

# [Plugin: Gravity Forms – Update Post] Creates a new entry

 *  [tomdaquino](https://wordpress.org/support/users/tomdaquino/)
 * (@tomdaquino)
 * [14 years ago](https://wordpress.org/support/topic/plugin-gravity-forms-update-post-creates-a-new-entry/)
 * Hello,
 * I’m using Gravity Forms Update Post to allow front-end editing of posts. If I
   request a form with a post ID that doesn’t exist (or that I don’t have permissions
   for), I get an empty form, which is what I would expect. But if I proceed to 
   fill the form out anyway and hit the submit button, the form creates a new posting.
   I don’t want this form to be able to create new postings, just edit existing 
   ones.
 * I set the ‘entries’ parameter in the gravityforms-update-post.php file to false
   as shown below but that doesn’t seem to resolve the issue:
 *     ```
       class GFUpdatePost
       {
         public $options = array(
           'request_id' => 'gform_post_id'
           ,'post_status' => 'default'
           ,'capabilities' => array(
             'update' => 'author'
             ,'delete' => 'disable'
           )
           ,'entries' => false
         );
       ```
   
 * I also tried this:
 *     ```
       class GFUpdatePost
       {
         public $options = array(
           'request_id' => 'gform_post_id'
           ,'post_status' => 'default'
           ,'capabilities' => array(
             'update' => 'author'
             ,'delete' => 'disable'
           )
           ,'entries' => 'false'
         );
       ```
   
 * But it didn’t work either. I see a reference in the readme.txt about disabling
   entries but I don’t quite understand where to add the suggested filter. Any assistance
   would be much appreciated and if I can get this plugin working the way I need
   it to, I will promptly follow up with a donation to support the cause.
 * Thanks,
    Tom
 * [http://wordpress.org/extend/plugins/gravity-forms-update-post/](http://wordpress.org/extend/plugins/gravity-forms-update-post/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [tomdaquino](https://wordpress.org/support/users/tomdaquino/)
 * (@tomdaquino)
 * [14 years ago](https://wordpress.org/support/topic/plugin-gravity-forms-update-post-creates-a-new-entry/#post-2750995)
 * My workaround to this issue is actually quite easy. I added a custom, hidden 
   field to my original post form that adds a value to a custom taxonomy I call “
   validation”. The hidden field is populated with a default value of {user:user_login}(
   see the Default Value/Insert Variable option on the Advanced Tab for the field).
   So with every post created by a form, the user’s login is stored in a custom 
   taxonomy field. I add the same custom, hidden field to my edit post form that
   pulls the user_login value up when you edit an entry that you have permissions
   for. If the edit post form does not pull up a value in the validation field, 
   that means the user either did not enter a valid post ID or they entered a post
   ID they do not have permissions for.
 * To make use of this validation so that the user cannot submit entries using the
   edit post form, I did the following:
 * On the Advanced tab for the Form Settings, check the Enable Conditional Logic
   checkbox. Enter the condition:
 * ‘Hide’ this form button ‘All’ of the following match:
    ‘validation’ is /blank/
 * In the second row, ‘validation’ is my custom field that should be populated with
   the user’s login. By /blank/ I mean leave the condition field empty. If the validation
   field is empty when the user tries to edit a post, the submit button for the 
   form will not be displayed.
 * Also, I realized that the ‘entries’ option identified in my previous post is 
   what allows the plugin to add a value to a field that was previously blank so
   most people will probably need that set as follows:
 *     ```
       class GFUpdatePost
       {
         public $options = array(
           'request_id' => 'gform_post_id'
           ,'post_status' => 'default'
           ,'capabilities' => array(
             'update' => 'author'
             ,'delete' => 'disable'
           )
           ,'entries' => true
         );
       ```
   
 *  Thread Starter [tomdaquino](https://wordpress.org/support/users/tomdaquino/)
 * (@tomdaquino)
 * [14 years ago](https://wordpress.org/support/topic/plugin-gravity-forms-update-post-creates-a-new-entry/#post-2750996)
 * Ok, I’m a doof. The ‘entries’ => true/false parameter determines whether or not
   the edit form creates a new form entry that can be viewed under the Entries section
   in the Gravity Forms administration area.
 * -Tom
 *  Thread Starter [tomdaquino](https://wordpress.org/support/users/tomdaquino/)
 * (@tomdaquino)
 * [14 years ago](https://wordpress.org/support/topic/plugin-gravity-forms-update-post-creates-a-new-entry/#post-2750999)
 * I should also point out that my solution above is not the most secure option 
   but it will work for the time being to keep the most casual of tinkerers from
   messing with my site. An ideal solution would be for some kind of logic in the
   plugin that disables the submit button if a post is not returned.
 * Thanks,
    Tom
 *  [YuliaK](https://wordpress.org/support/users/yuliak/)
 * (@yuliak)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-gravity-forms-update-post-creates-a-new-entry/#post-2751106)
 * Hi tomdaquino,
 * Did you ever figure out how to make the plugin edit the entry instead of creating
   a new one? If I only want to edit one field, it doesn’t make sense to have a 
   bunch of almost identical entries in the entries table. Could you post your solutions
   here if you have one please.
 * Thanks,
    Yulia.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Gravity Forms – Update Post] Creates a new entry’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gravity-forms-update-post_68a432.
   svg)
 * [Gravity Forms - Update Post](https://wordpress.org/plugins/gravity-forms-update-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-update-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-update-post/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-update-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-update-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-update-post/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [YuliaK](https://wordpress.org/support/users/yuliak/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-gravity-forms-update-post-creates-a-new-entry/#post-2751106)
 * Status: not resolved