{"id":257375,"date":"2025-10-28T06:05:31","date_gmt":"2025-10-28T06:05:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/post-picker-for-gravity-forms\/"},"modified":"2025-10-28T06:05:09","modified_gmt":"2025-10-28T06:05:09","slug":"post-picker-for-gravity-forms","status":"publish","type":"plugin","link":"https:\/\/lij.wordpress.org\/plugins\/post-picker-for-gravity-forms\/","author":23121182,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"1.0.0","tested":"6.8.5","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Post Picker for Gravity Forms","header_author":"YMMV LLC","header_description":"Adds a custom field to Gravity Forms that allows selection of posts from any post type.","assets_banners_color":"","last_updated":"2025-10-28 06:05:09","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/www.ymmv.co","rating":0,"author_block_rating":0,"active_installs":0,"downloads":165,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"ymmvplugins","date":"2025-10-28 06:05:09"}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2007,1863,2240,1655,9775],"plugin_category":[42],"plugin_contributors":[232383],"plugin_business_model":[],"class_list":["post-257375","plugin","type-plugin","status-publish","hentry","plugin_tags-cpt","plugin_tags-dropdown","plugin_tags-field","plugin_tags-gravity-forms","plugin_tags-gravityforms","plugin_category-contact-forms","plugin_contributors-ymmvplugins","plugin_committers-ymmvplugins"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/post-picker-for-gravity-forms.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>Post Picker for Gravity Forms<\/strong> 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.<\/p>\n\n<p>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.<\/p>\n\n<h4>What Makes Post Picker for Gravity Forms Special?<\/h4>\n\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n<h4>Core Features<\/h4>\n\n<ul>\n<li><strong>Universal Post Type Support<\/strong> \u2013 Works with Posts, Pages, and all custom post types registered on your site<\/li>\n<li><strong>Smart Data Handling<\/strong> \u2013 Stores post IDs but displays post titles for better user experience<\/li>\n<li><strong>Native Gravity Forms Integration<\/strong> \u2013 Appears in the Advanced Fields section alongside other professional field types<\/li>\n<li><strong>Enhanced UI Compatible<\/strong> \u2013 Fully supports Gravity Forms' Enhanced UI for improved mobile experience<\/li>\n<li><strong>Conditional Logic Ready<\/strong> \u2013 Complete support for Gravity Forms conditional logic functionality<\/li>\n<li><strong>Merge Tag Compatible<\/strong> \u2013 Works seamlessly with all Gravity Forms merge tags and notifications<\/li>\n<li><strong>Customizable Placeholder<\/strong> \u2013 Set custom placeholder text or use the default \"Please Select\"<\/li>\n<li><strong>Validation Built-in<\/strong> \u2013 Automatically validates that selected posts exist and are published<\/li>\n<li><strong>Developer Friendly<\/strong> \u2013 Includes filters for customizing post queries and extending functionality<\/li>\n<li><strong>Performance Optimized<\/strong> \u2013 Efficient database queries with built-in limits and caching considerations<\/li>\n<\/ul>\n\n<h4>Perfect For These Use Cases<\/h4>\n\n<ul>\n<li><strong>Contact Forms<\/strong> \u2013 Let users select which product or service they are contacting you about<\/li>\n<li><strong>Support Ticket Systems<\/strong> \u2013 Let users reference specific documentation or FAQ posts<\/li>\n<li><strong>Event Registration Forms<\/strong> \u2013 Let attendees select which event they're registering for<\/li>\n<li><strong>Product Inquiry Forms<\/strong> \u2013 Allow customers to ask questions about specific products<\/li>\n<li><strong>Content Voting Systems<\/strong> \u2013 Enable users to vote on their favorite blog posts or content<\/li>\n<li><strong>Appointment Booking<\/strong> \u2013 Let clients select from available time slots stored as custom posts<\/li>\n<li><strong>Course Registration<\/strong> \u2013 Allow students to enroll in specific courses from your course post type<\/li>\n<li><strong>Real Estate Inquiries<\/strong> \u2013 Let prospects inquire about specific properties<\/li>\n<li><strong>Job Applications<\/strong> \u2013 Allow applicants to apply for specific job openings<\/li>\n<\/ul>\n\n<h4>Technical Excellence<\/h4>\n\n<p>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.<\/p>\n\n<h4>Developer Features<\/h4>\n\n<p>For developers, the plugin includes the <code>ppfgf_get_posts_args<\/code> 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.<\/p>\n\n<h3>Developer Information<\/h3>\n\n<p>Post Picker for Gravity Forms is built with developers in mind and includes several hooks and filters for customization.<\/p>\n\n<h4>Available Filters<\/h4>\n\n<p><strong>ppfgf_get_posts_args<\/strong><\/p>\n\n<p>The main filter for customizing which posts appear in the dropdown. This filter receives three parameters:<\/p>\n\n<ul>\n<li><code>$args<\/code> (array) \u2013 The WP_Query arguments<\/li>\n<li><code>$post_type<\/code> (string) \u2013 The selected post type<\/li>\n<li><code>$field<\/code> (PPFGF_Field) \u2013 The field object<\/li>\n<\/ul>\n\n<h4>Code Examples<\/h4>\n\n<p><strong>Limit to Recent Posts<\/strong>\n\u201c<code>php\nadd_filter( 'ppfgf_get_posts_args', function( $args, $post_type, $field ) {\n    \/\/ Only show posts from last 30 days\n    $args['date_query'] = array(\n        array(\n            'after' =&gt; '30 days ago',\n        ),\n    );\n    return $args;\n}, 10, 3 );\n\u201c<\/code><\/p>\n\n<p><strong>Change Post Ordering<\/strong>\n\u201c<code>php\nadd_filter( 'ppfgf_get_posts_args', function( $args ) {\n    \/\/ Order by date instead of title\n    $args['orderby'] = 'date';\n    $args['order'] = 'DESC';\n    return $args;\n} );\n\u201c<\/code><\/p>\n\n<p><strong>Filter by Meta Field<\/strong>\n\u201c<code>php\nadd_filter( 'ppfgf_get_posts_args', function( $args ) {\n    \/\/ Only show featured posts\n    $args['meta_query'] = array(\n        array(\n            'key' =&gt; 'featured',\n            'value' =&gt; '1',\n            'compare' =&gt; '='\n        )\n    );\n    return $args;\n} );\n\u201c<\/code><\/p>\n\n<p><strong>Increase Post Limit<\/strong>\n\u201c<code>php\nadd_filter( 'ppfgf_get_posts_args', function( $args ) {\n    \/\/ Show up to 100 posts instead of 50\n    $args['posts_per_page'] = 100;\n    return $args;\n} );\n\u201c<\/code><\/p>\n\n<p><strong>Filter by Category (for Posts)<\/strong>\n\u201c<code>php\nadd_filter( 'ppfgf_get_posts_args', function( $args, $post_type ) {\n    if ( 'post' === $post_type ) {\n        \/\/ Only show posts from specific category\n        $args['category_name'] = 'events';\n    }\n    return $args;\n}, 10, 2 );\n\u201c<\/code><\/p>\n\n<p><strong>Field-Specific Filtering<\/strong>\n\u201c<code>php\nadd_filter( 'ppfgf_get_posts_args', function( $args, $post_type, $field ) {\n    \/\/ Only apply to specific field ID\n    if ( 5 === $field-&gt;id ) {\n        $args['author'] = 1; \/\/ Only posts by user ID 1\n    }\n    return $args;\n}, 10, 3 );\n\u201c<\/code><\/p>\n\n<!--section=installation-->\n<h4>Automatic Installation<\/h4>\n\n<ol>\n<li>Log in to your WordPress admin panel<\/li>\n<li>Navigate to Plugins &gt; Add New<\/li>\n<li>Search for \"Post Picker for Gravity Forms\"<\/li>\n<li>Click \"Install Now\" and then \"Activate\"<\/li>\n<\/ol>\n\n<h4>Manual Installation<\/h4>\n\n<ol>\n<li>Download the plugin zip file<\/li>\n<li>Log in to your WordPress admin panel<\/li>\n<li>Navigate to Plugins &gt; Add New &gt; Upload Plugin<\/li>\n<li>Choose the zip file and click \"Install Now\"<\/li>\n<li>Activate the plugin<\/li>\n<\/ol>\n\n<h4>After Installation<\/h4>\n\n<ol>\n<li>Make sure Gravity Forms is installed and activated<\/li>\n<li>Create or edit a Gravity Form<\/li>\n<li>Add the Post Picker field from the Advanced Fields section<\/li>\n<li>Configure the post type in the field settings<\/li>\n<li>Save your form and test it on the frontend<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20do%20i%20add%20a%20post%20picker%20field%20to%20my%20gravity%20form%3F'><h3>How do I add a Post Picker field to my Gravity Form?<\/h3><\/dt>\n<dd><p>Adding a Post Picker field to your Gravity Form is simple:<\/p>\n\n<ol>\n<li>Navigate to your WordPress admin and go to Forms &gt; Forms<\/li>\n<li>Edit an existing form or create a new one<\/li>\n<li>In the form editor, click the \"Add Field\" button<\/li>\n<li>Look for \"Post Picker\" in the Advanced Fields section (it appears alongside Name, Date, Time, and other advanced fields)<\/li>\n<li>Drag the Post Picker field to your desired location in the form<\/li>\n<li>Click on the field to open the field settings panel<\/li>\n<li>Configure the \"Post Type\" dropdown to select which post type you want to display (Posts, Pages, or any custom post type)<\/li>\n<li>Optionally customize the field label, description, and placeholder text<\/li>\n<li>Save your form<\/li>\n<\/ol><\/dd>\n<dt id='which%20post%20types%20does%20post%20picker%20for%20gravity%20forms%20support%3F'><h3>Which post types does Post Picker for Gravity Forms support?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms supports all public post types registered on your WordPress site. This includes:<\/p>\n\n<ul>\n<li><strong>Built-in WordPress post types<\/strong>: Posts and Pages<\/li>\n<li><strong>Custom post types<\/strong>: Any custom post type created by themes or plugins (such as Products, Events, Portfolio items, etc.)<\/li>\n<li><strong>Plugin-created post types<\/strong>: Post types from WooCommerce, Events Calendar, Custom Post Type UI, and other plugins<\/li>\n<\/ul>\n\n<p>The plugin automatically detects and lists all available public post types in the Post Type dropdown when configuring the field. Only viewable post types are included to ensure users can only select from appropriate content.<\/p><\/dd>\n<dt id='what%20data%20does%20post%20picker%20for%20gravity%20forms%20save%20when%20a%20form%20is%20submitted%3F'><h3>What data does Post Picker for Gravity Forms save when a form is submitted?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms uses a smart dual-storage approach:<\/p>\n\n<ul>\n<li><strong>Database Storage<\/strong>: The post ID is stored in the database for data integrity and relationships<\/li>\n<li><strong>Display Value<\/strong>: The post title is displayed in form entries, email notifications, and merge tags for human readability<\/li>\n<\/ul>\n\n<p>This means if you change a post title later, your form entries will automatically reflect the updated title while maintaining the correct reference to the original post. The post ID ensures data accuracy even if content is modified.<\/p><\/dd>\n<dt id='can%20post%20picker%20for%20gravity%20forms%20work%20with%20gravity%20forms%20conditional%20logic%3F'><h3>Can Post Picker for Gravity Forms work with Gravity Forms conditional logic?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms has full support for Gravity Forms conditional logic. You can:<\/p>\n\n<ul>\n<li>Show or hide the Post Picker field based on other field values<\/li>\n<li>Use the Post Picker field selection to show or hide other fields<\/li>\n<li>Create complex conditional logic chains involving the Post Picker field<\/li>\n<li>Use conditional logic with confirmation messages and notifications<\/li>\n<\/ul>\n\n<p>The field integrates seamlessly with Gravity Forms' conditional logic system, treating post selections just like any other field value.<\/p><\/dd>\n<dt id='does%20post%20picker%20for%20gravity%20forms%20work%20with%20merge%20tags%3F'><h3>Does Post Picker for Gravity Forms work with merge tags?<\/h3><\/dt>\n<dd><p>Absolutely! Post Picker for Gravity Forms is fully compatible with Gravity Forms merge tags. You can use the field value in:<\/p>\n\n<ul>\n<li><strong>Email notifications<\/strong> \u2013 Include the selected post title in admin and user emails<\/li>\n<li><strong>Confirmation messages<\/strong> \u2013 Display the selected post in thank you messages<\/li>\n<li><strong>Conditional notifications<\/strong> \u2013 Send different emails based on which post was selected<\/li>\n<li><strong>Third-party integrations<\/strong> \u2013 Pass post data to external services via webhooks or API integrations<\/li>\n<\/ul>\n\n<p>The merge tag will display the post title (not the ID) for better readability in communications.<\/p><\/dd>\n<dt id='how%20many%20posts%20can%20post%20picker%20for%20gravity%20forms%20display%20in%20the%20dropdown%3F'><h3>How many posts can Post Picker for Gravity Forms display in the dropdown?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms displays up to 50 posts in the dropdown by default. Posts are ordered alphabetically by title for easy browsing. This limit ensures good performance even on sites with thousands of posts.<\/p>\n\n<p>If you need to display more posts or change the ordering, you can use the <code>ppfgf_get_posts_args<\/code> filter to customize the query (see the Developer Information section below).<\/p><\/dd>\n<dt id='can%20i%20customize%20which%20posts%20appear%20in%20the%20post%20picker%20dropdown%3F'><h3>Can I customize which posts appear in the Post Picker dropdown?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms includes developer-friendly filters that allow you to customize exactly which posts appear. You can filter by:<\/p>\n\n<ul>\n<li>Date ranges (e.g., only posts from the last 30 days)<\/li>\n<li>Meta field values<\/li>\n<li>Author<\/li>\n<li>Categories or taxonomies<\/li>\n<li>Custom criteria<\/li>\n<\/ul>\n\n<p>See the Developer Information section below for code examples.<\/p><\/dd>\n<dt id='does%20post%20picker%20for%20gravity%20forms%20work%20with%20the%20enhanced%20ui%20feature%3F'><h3>Does Post Picker for Gravity Forms work with the Enhanced UI feature?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms fully supports Gravity Forms' Enhanced UI feature. When Enhanced UI is enabled for the field, it provides:<\/p>\n\n<ul>\n<li>Improved mobile experience with native mobile dropdowns<\/li>\n<li>Better accessibility features<\/li>\n<li>Enhanced styling that matches your theme<\/li>\n<li>Improved usability on touch devices<\/li>\n<\/ul>\n\n<p>Simply enable \"Enhanced UI\" in the field settings to activate this feature.<\/p><\/dd>\n<dt id='what%20happens%20if%20a%20selected%20post%20is%20deleted%20after%20form%20submission%3F'><h3>What happens if a selected post is deleted after form submission?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms handles this gracefully. If a post is deleted after someone has selected it in a form:<\/p>\n\n<ul>\n<li><strong>Existing entries<\/strong> will show the post ID instead of the title in the admin (since the title is no longer available)<\/li>\n<li><strong>New submissions<\/strong> will not be able to select the deleted post (it won't appear in the dropdown)<\/li>\n<li><strong>Validation<\/strong> prevents submission of invalid post IDs<\/li>\n<\/ul>\n\n<p>The plugin includes built-in validation to ensure only published, existing posts can be selected.<\/p><\/dd>\n<dt id='can%20i%20use%20post%20picker%20for%20gravity%20forms%20with%20custom%20post%20statuses%3F'><h3>Can I use Post Picker for Gravity Forms with custom post statuses?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms only displays posts with a \"publish\" status by default. This ensures that users can only select publicly available content.<\/p>\n\n<p>If you need to include posts with custom statuses, you can use the <code>ppfgf_get_posts_args<\/code> filter to modify the query and include additional post statuses.<\/p><\/dd>\n<dt id='does%20post%20picker%20for%20gravity%20forms%20affect%20my%20site%27s%20performance%3F'><h3>Does Post Picker for Gravity Forms affect my site's performance?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms is designed with performance in mind:<\/p>\n\n<ul>\n<li><strong>Efficient queries<\/strong> \u2013 Uses optimized WordPress queries with appropriate limits<\/li>\n<li><strong>Minimal database impact<\/strong> \u2013 Only queries posts when the form is displayed<\/li>\n<li><strong>No frontend JavaScript<\/strong> \u2013 Uses native HTML select elements for fast rendering<\/li>\n<li><strong>Caching friendly<\/strong> \u2013 Compatible with WordPress caching plugins<\/li>\n<\/ul>\n\n<p>The plugin adds minimal overhead to your forms and won't slow down your site.<\/p><\/dd>\n<dt id='is%20post%20picker%20for%20gravity%20forms%20translation%20ready%3F'><h3>Is Post Picker for Gravity Forms translation ready?<\/h3><\/dt>\n<dd><p>Yes! Post Picker for Gravity Forms is fully translation ready and includes:<\/p>\n\n<ul>\n<li><strong>Text domain<\/strong>: <code>post-picker-for-gravity-forms<\/code><\/li>\n<li><strong>POT file<\/strong> included for translators<\/li>\n<li><strong>RTL support<\/strong> \u2013 Works with right-to-left languages<\/li>\n<li><strong>WordPress.org translation system<\/strong> compatibility<\/li>\n<\/ul>\n\n<p>All user-facing strings are properly internationalized and ready for translation into any language.<\/p><\/dd>\n<dt id='can%20i%20style%20the%20post%20picker%20field%20to%20match%20my%20theme%3F'><h3>Can I style the Post Picker field to match my theme?<\/h3><\/dt>\n<dd><p>Yes! Post Picker for Gravity Forms uses standard Gravity Forms CSS classes and markup, making it easy to style:<\/p>\n\n<ul>\n<li>Uses the same CSS classes as other Gravity Forms select fields<\/li>\n<li>Inherits your theme's form styling automatically<\/li>\n<li>Compatible with Gravity Forms' built-in styling options<\/li>\n<li>Can be customized with additional CSS classes in the field settings<\/li>\n<\/ul>\n\n<p>The field will automatically match your existing form styling without additional work.<\/p><\/dd>\n<dt id='what%20are%20the%20minimum%20requirements%20for%20post%20picker%20for%20gravity%20forms%3F'><h3>What are the minimum requirements for Post Picker for Gravity Forms?<\/h3><\/dt>\n<dd><p>Post Picker for Gravity Forms requires:<\/p>\n\n<ul>\n<li><strong>WordPress<\/strong>: 6.0 or higher<\/li>\n<li><strong>PHP<\/strong>: 7.4 or higher<\/li>\n<li><strong>Gravity Forms<\/strong>: 2.5 or higher (the plugin uses the official Gravity Forms Add-On Framework)<\/li>\n<\/ul>\n\n<p>The plugin is tested up to WordPress 6.8 and follows WordPress coding standards for maximum compatibility.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Creates dynamic dropdowns populated with posts from any post type in your Gravity Forms","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/257375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=257375"}],"author":[{"embeddable":true,"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ymmvplugins"}],"wp:attachment":[{"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=257375"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=257375"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=257375"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=257375"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=257375"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/lij.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=257375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}