Post Picker for Gravity Forms revolutionizes how you collect post-related data in your forms by adding a sophisticated custom field type that seamlessly integrates with the Gravity Forms ecosystem.
This plugin solves a common problem: allowing users to select from existing content on your WordPress site through forms. Whether you need visitors to choose from blog posts, select products, pick events, or reference any custom post type content, Post Picker for Gravity Forms makes it effortless.
What Makes Post Picker for Gravity Forms Special?
Unlike basic dropdown fields that require manual option entry, Post Picker for Gravity Forms automatically populates dropdown menus with real content from your WordPress database. The field dynamically loads up to 50 posts from your chosen post type, displaying them alphabetically by title for easy selection.
The plugin maintains data integrity by storing post IDs internally while displaying human-readable post titles to users. This approach ensures that even if post titles change, your form entries remain accurate and meaningful.
Core Features
- Universal Post Type Support – Works with Posts, Pages, and all custom post types registered on your site
- Smart Data Handling – Stores post IDs but displays post titles for better user experience
- Native Gravity Forms Integration – Appears in the Advanced Fields section alongside other professional field types
- Enhanced UI Compatible – Fully supports Gravity Forms』 Enhanced UI for improved mobile experience
- Conditional Logic Ready – Complete support for Gravity Forms conditional logic functionality
- Merge Tag Compatible – Works seamlessly with all Gravity Forms merge tags and notifications
- Customizable Placeholder – Set custom placeholder text or use the default 「Please Select」
- Validation Built-in – Automatically validates that selected posts exist and are published
- Developer Friendly – Includes filters for customizing post queries and extending functionality
- Performance Optimized – Efficient database queries with built-in limits and caching considerations
Perfect For These Use Cases
- Contact Forms – Let users select which product or service they are contacting you about
- Support Ticket Systems – Let users reference specific documentation or FAQ posts
- Event Registration Forms – Let attendees select which event they』re registering for
- Product Inquiry Forms – Allow customers to ask questions about specific products
- Content Voting Systems – Enable users to vote on their favorite blog posts or content
- Appointment Booking – Let clients select from available time slots stored as custom posts
- Course Registration – Allow students to enroll in specific courses from your course post type
- Real Estate Inquiries – Let prospects inquire about specific properties
- Job Applications – Allow applicants to apply for specific job openings
Technical Excellence
Post Picker for Gravity Forms is built using the official Gravity Forms Add-On Framework, ensuring maximum compatibility and following WordPress coding standards. The plugin includes comprehensive validation, sanitization, and security measures to protect your site and data.
Developer Features
For developers, the plugin includes the ppfgf_get_posts_args filter, allowing complete customization of the post query. You can modify which posts appear, change ordering, add meta queries, filter by date ranges, or implement any custom logic your project requires.
Developer Information
Post Picker for Gravity Forms is built with developers in mind and includes several hooks and filters for customization.
Available Filters
ppfgf_get_posts_args
The main filter for customizing which posts appear in the dropdown. This filter receives three parameters:
$args(array) – The WP_Query arguments$post_type(string) – The selected post type$field(PPFGF_Field) – The field object
Code Examples
Limit to Recent Posts
「php
add_filter( 'ppfgf_get_posts_args', function( $args, $post_type, $field ) {
// Only show posts from last 30 days
$args['date_query'] = array(
array(
'after' => '30 days ago',
),
);
return $args;
}, 10, 3 );
「
Change Post Ordering
「php
add_filter( 'ppfgf_get_posts_args', function( $args ) {
// Order by date instead of title
$args['orderby'] = 'date';
$args['order'] = 'DESC';
return $args;
} );
「
Filter by Meta Field
「php
add_filter( 'ppfgf_get_posts_args', function( $args ) {
// Only show featured posts
$args['meta_query'] = array(
array(
'key' => 'featured',
'value' => '1',
'compare' => '='
)
);
return $args;
} );
「
Increase Post Limit
「php
add_filter( 'ppfgf_get_posts_args', function( $args ) {
// Show up to 100 posts instead of 50
$args['posts_per_page'] = 100;
return $args;
} );
「
Filter by Category (for Posts)
「php
add_filter( 'ppfgf_get_posts_args', function( $args, $post_type ) {
if ( 'post' === $post_type ) {
// Only show posts from specific category
$args['category_name'] = 'events';
}
return $args;
}, 10, 2 );
「
Field-Specific Filtering
「php
add_filter( 'ppfgf_get_posts_args', function( $args, $post_type, $field ) {
// Only apply to specific field ID
if ( 5 === $field->id ) {
$args['author'] = 1; // Only posts by user ID 1
}
return $args;
}, 10, 3 );
「






