Title: Conditionally Create Custom Post?
Last modified: August 31, 2016

---

# Conditionally Create Custom Post?

 *  Resolved [ejclarkster](https://wordpress.org/support/users/ejclarkster/)
 * (@ejclarkster)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/conditionally-create-custom-post/)
 * Hi guys,
 * Is it possible to conditionally create a custom post based on something that 
   happens in your form?
 * My custom post must only post under certain conditions — either a discount is
   generated by the form submission, or it’s not. I’m using the conditional display
   of GF to hide the Post Title field when I want the form NOT to post the custom
   post, but even then, every time it gets posted anyway, just with a title of (
   no title).
 * How can I force the form not to post the custom type when I don’t want it to?
 * Thanks in advance.
    EJ
 * [https://wordpress.org/plugins/gravity-forms-custom-post-types/](https://wordpress.org/plugins/gravity-forms-custom-post-types/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [ejclarkster](https://wordpress.org/support/users/ejclarkster/)
 * (@ejclarkster)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/conditionally-create-custom-post/#post-6964928)
 * Hmm, I seem to have figured it out: Not only your post title must be hidden to
   avoid posting, but every single field being used in posting the post must also
   be hidden.
 * I had the post title hidden, but one of the custom fields was still displaying,
   and apparently that overrides the hidden title and posts anyway, albeit with 
   a blank title.

Viewing 1 replies (of 1 total)

The topic ‘Conditionally Create Custom Post?’ is closed to new replies.

 * ![](https://ps.w.org/gravity-forms-custom-post-types/assets/icon-256x256.png?
   rev=2542252)
 * [Gravity Forms + Custom Post Types](https://wordpress.org/plugins/gravity-forms-custom-post-types/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-custom-post-types/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/reviews/)

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)

 * 1 reply
 * 1 participant
 * Last reply from: [ejclarkster](https://wordpress.org/support/users/ejclarkster/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/conditionally-create-custom-post/#post-6964928)
 * Status: resolved