The very amazing Yoast authored a great post/tutorial earlier this year on how to use Gravity Forms to submit custom post types. He talked about using Gravity Forms in conjunction with the WP Types plugin to make this relationship work.
Before we go any further, I’d like to back up and explain what both of these plugins do. (Alert: You may step on an affiliate link in this post.)
What is Gravity Forms?
Gravity Forms is a premium WordPress plugin used to create and manage forms on your WordPress site. What makes it stand out from other contact form plugins (and worth paying for) is its add-on services. You can EASILY integrate with Aweber, MailChimp, PayPal, and even register new users in WordPress.
It’s well-documented, supported, and widely used in the WordPress developer community.
What is WP Types?
In short, WP Types is a premium WordPress plugin used to create and manage custom post types, custom fields, and post relationships. Custom post types (CPTs) are not hard to add manually, but this little plugin definitely speeds up the process and reduces the chance of
operator error accidents.
The plugin comes bundled with WP Views, which is a display engine used to show off things created with WP Types.
Types and Views are two WordPress plugins that work in perfect harmony, together, enabling rapid development of WordPress sites. – OnTheGoSystems, INC. (plugin creator)
These two plugins are a match made in WordPress heaven. If we can continue on the wedding theme a moment, allow me to introduce you to the preacher that united these two plugins in holy matrimony. After that, we’ll dance on into the reception.
Meet the preacher: Gravity Forms + Custom Post Types
Authored by Bradvin, the Gravity Forms + Custom Post Types name explains itself. This plugin provides the bridge that allows form entries to be inserted into a custom post type. In addition to mapping form fields to a custom post type, you can even link a field to a custom taxonomy (think: populate a drop-down box in your form with a list of custom taxonomies).
You may be thinking “Ok, sounds cool, but what the heck do I do with it?” Good question. Let me give you a simple usage scenario from a recent project I did.
- The client wanted a Testimonials section on the website (I created a custom post type with WP Types).
- Site visitors needed to be able to submit a testimonial through the website (Gravity Forms).
- Form submissions needed to be saved to the Testimonials custom post type (Gravity Forms + Custom Post Types)
- Submitted testimonials needed to automatically be displayed on the Testimonials page (WP Views)
Make sense? There are endless applications here – this couple has a very bright future!
Picking Up Where Yoast Left Off
Going back to the original Yoast article, he walks you through in detail how to create a custom post type with custom fields and follows it up with instructions on creating a form through which people can submit something that fills this post type. Where he leaves off is the final step of creating a browsable interface for the custom post type. That’s where the WP Views plugin really gets to shine on the dance floor.
I’m going to be a buzz-kill and leave off in the same spot for this post. I wanted to introduce these plugins to you and next post I’ll pick up with more details on WP Views and how to show off your custom post types.
Until then, party on Wayne.