[WordPress] 外掛分享: Post Picker for Gravity Forms

前言介紹

  • 這款 WordPress 外掛「Post Picker for Gravity Forms」是 2025-10-27 上架。
  • 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
  • 上一次更新是 2025-10-28,距離現在已有 121 天。
  • 外掛最低要求 WordPress 6.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

ymmvplugins |

外掛標籤

cpt | field | dropdown | GravityForms | gravity forms |

內容簡介

```html
<ul>
<li>Gravity Forms 的 Post Picker 外掛透過添加一種複雜的自訂欄位類型,與 Gravity Forms 生態系統無縫集成,徹底改變了如何在表單中收集與文章相關的數據。</li>
<li>這個外掛解決了一個常見問題:允許用戶通過表單從您的 WordPress 網站現有內容中進行選擇。不論您需要訪客從文章中選擇、選擇產品、挑選事件或引用任何自訂文章類型的內容,Post Picker for Gravity Forms 都能輕鬆實現。</li>
</ul>

<h4>Post Picker for Gravity Forms 的特色</h4>
<ul>
<li>與基本下拉菜單字段不同,Post Picker for Gravity Forms 自動從 WordPress 數據庫中實際內容填充下拉菜單。這個字段動態載入最多50個您選擇文章類型的文章,按標題字母順序排列,方便選擇。</li>
<li>該外掛通過在內部存儲文章 ID,同時向用戶顯示易讀的文章標題來保持數據完整性。這種方法確保即使文章標題更改,您的表單項目仍然準確而有意義。</li>
</ul>

<h4>Post Picker for Gravity Forms 核心功能</h4>
<ul>
<li>通用文章類型支持 – 可與您網站註冊的所有文章、頁面和自訂文章類型一起工作</li>
<li>智能數據處理 – 存儲文章 ID,但以文章標題顯示,提供更好的用戶體驗</li>
<li>原生 Gravity Forms 集成 – 出現在進階字段部分,與其他專業字段類型並列</li>
<li>增強 UI 兼容 – 完全支持 Gravity Forms 的增強 UI,提供更好的移動體驗</li>
<li>條件邏輯就緒 – 完全支持 Gravity Forms 的條件邏輯功能</li>
<li>合併標籤兼容 – 與所有 Gravity Forms 合併標籤和通知無縫配合</li>
<li>可自定義的占位符 – 設置自定義的占位文本或使用默認的 "請選擇"</li>
<li>內置驗證 – 自動驗證所選文章是否存在並已發布</li>
<li>開發者友好 – 包含用於自訂文章查詢和擴展功能的過濾器</li>
</ul>
```

原文外掛簡介

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 );

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Post Picker for Gravity Forms」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.0 | trunk |

延伸相關外掛(你可能也想知道)

  • Smart Custom Fields 》Smart Custom Fields 是一個管理自訂欄位的簡單外掛。, 功能, , 支援自訂欄位群組迴圈。, 支援元資料修訂。, 支援元資料預覽。, , , 欄位類型, , 文字, 文字...。
  • Advanced Custom Fields: Image Aspect Ratio Crop Field 》這是一個進階自訂欄位 (Advanced Custom Fields) 的外掛,會在使用者上傳圖片後強制執行特定的長寬比例或像素大小裁剪。使用長寬比例對於回應式圖片的使用情...。
  • Masks Form Fields 》新增表單欄位的類別。, 使用 Contact Form 7 的範例:, [tel your-phone class:phone placeholder "Phone"], , 可用於使用的類別清單:, ('span.start, input.s...。
  • ACF Field For CF7 》此外掛為「Advanced Custom Fields」WordPress 外掛添加一個「Contact Form 7」欄位類型。, 您可以將一個或多個聯絡表單存儲在「Advanced Custom Fields」欄...。
  • Quantity Field on Shop Page for WooCommerce 》這款外掛會在 WooCommerce 網店的購物頁面上顯示商品數量欄位,讓客戶可以在加入購物車前變更商品數量。。
  • Gravity Slider Fields 》Gravity Forms 目前還不支援滑桿欄位,但在此之前,這個外掛可以很好地發揮作用。, 這個外掛將在進階欄位群組中新增一個滑桿欄位。您可以使用以下一組選項自...。
  • Comments Shortcode 》這個外掛程式允許您在 WordPress 的任何位置顯示評論和評論表單。可以在不修改代碼的情況下顯示 WordPress 頁面和文章的評論列表,並且它與大部分可用的佈景...。
  • Advanced Custom Fields – Location Field add-on 》這是一個針對Advanced Custom Fields WordPress 外掛的擴充套件,除非已安裝且啟用 Advanced Custom Fields,否則對 WordPress 不提供任何功能。, Location ...。
  • Show User ID 》「Show User ID」是一款小型的外掛,可在 WordPress 儀表板的使用者部分的表格中顯示欄位 ID。它將被添加為每個使用者的其他數據的一列。, 功能, , 在使用者...。
  • Advanced Custom Fields: reCAPTCHA Field 》ACF reCAPTCHA將Google reCAPTCHA帶入Advanced Custom Fields,以用於前端表單。, 功能包括:, , ACF reCAPTCHA Protection確保垃圾郵件機器人無法繞過reCAPT...。
  • Flexible Content Extended for Advanced Custom Fields 》透過將版面配置列表轉換為帶有圖像預覽的對話框,擴展了 ACF 靈活內容欄位 (Flexible Content Field)的功能。同時,在對版面配置進行編輯時,亦採用了更好的...。
  • reCAPTCHA for Ninja Forms 》更新:Ninja Forms 3.0 現在內建 Google reCAPTCHA 整合功能。如果您正在使用最新版本的 Ninja Forms,則不必再安裝此外掛程式以進行 reCAPTCHA 整合, 在 Nin...。
  • Gravity Forms Data Persistence Add-On Reloaded 》請思考這樣的情境:, a) 你的網站使用多頁 Gravity Forms。, b) 使用者登入網站,並開始填寫一個有 5 個步驟的表單。, c) 在第三步,使用者離開網站,並未完...。
  • Contact Form 7 WooCommerce Order Dropdown Field 》將 Woocommerce 訂單下拉選單添加到熱門的 Contact Form 7 外掛。這個欄位會建立一個下拉選單來顯示當前使用者的訂單。, 這個外掛將讓 Contact Form7 表單更...。
  • Add Quantity Field on Shop Page for WooCommerce 》您想在 WooCommerce 商店頁面上添加數量欄位嗎?, 使用此外掛程式,您可以輕鬆在 WooCommerce 商店頁面上顯示數量欄位。如果您在商店頁面上啟用變體選項,此...。

文章
Filter
Mastodon