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.

Submitting a form creates a new blank draft post?

  1. This is weird. Whenever I submit a form, it creates a new blank draft post .....

    I am not currently not emailing the form submission results to anywhere. Instead I am redirecting to a .php page using "Pass Field Data Via Query String". That works great.

    The other weird thing is the category the post gets put into is totally random. Currently i have three draft posts - one says "-" for the category, one says "uncategorized", and one says "Thai IDN News", which is the single category I have.

    Any idea why these draft posts are being created? I have latest versions of Gravity Forms, Gravity Forms ML and WPML.

    There is a clue ... I have PHP debug on and there is a notice coming up when I hit submit saying something about ... Undefined Index: PostAuthor and the code is inside gravityforms plugin code. But its only up for half a second so very hard for me to make out the entire line, but the code is in gravityforms/forms_model.php on line 1443.

    Hope that helps diagnose the issue!

    If it helps, the shortcode I am using is:

    [gravityform id="4" title=false description=false ajax=true]

    Perhaps there is something "wrong" with that ....

    Posted 11 years ago on Thursday January 17, 2013 | Permalink
  2. If a draft post is being created, you have likely used one of the Post fields in the form builder. Can you check for that and be sure you are not using any field from the "Post Fields" section of the form builder? Gravity Forms will not create a post unless you used post fields.

    Screenshot: http://minus.com/lbeAYUxJHucAHb

    Don't use any of these Post Fields if you don't want to create a post. Sometimes people inadvertently use the Image field here. Use the "File Upload" field from the Advanced section instead. You can limit the file types you all when you configure that field.

    Posted 11 years ago on Thursday January 17, 2013 | Permalink
  3. Thanks for your quick reply. Unfortunately its just a single field form, the field being of the type "single text line":

    http://min.us/lDEKIeDkA2PAJ

    Its just to allow a keyword to be input, a search term if you like. There are no images. The form button is text, not an image.

    Perhaps there are some other fields in the form that are somehow "hidden" or I deleted and are still "attached" somehow? Is there any way to detect that? I'm happy looking at stuff in the DB if that helps. Whatever is easiest.

    The only other thing I can think is this is using Gravity Forms Multi-lingual (Version 0.9.3) - perhaps there is some issue there, a bug even?

    Posted 11 years ago on Thursday January 17, 2013 | Permalink
  4. You're using a custom field from the Post Fields section. It's not a plain single line text field. That will store a meta key 'wpcf-search' and meta value in a post, which is why you're getting draft posts created.

    Posted 11 years ago on Thursday January 17, 2013 | Permalink
  5. Ah yes of course, sorry, I didn't need that wpcf-search in there at all. I just wanted to pass a URL parameter called "keyword" into a search tool. I've changed it to a single text field and all is well. Many thanks.

    Just one further question. I didn't even know before you could use Gravity Forms to auto-generate posts. Is it possible to do that as a "background operation" i.e. the user never even being aware of it, and have the post made public as well. Its for another section of the site, where people can make offers on domains, I would like to use those offer submissions to create published new pages. Possible?

    Posted 11 years ago on Thursday January 17, 2013 | Permalink
  6. Yes it's possible. You don't have to tell people they are creating posts. Just accept their information and publish the post.

    Posted 11 years ago on Thursday January 17, 2013 | Permalink