前言介紹
- 這款 WordPress 外掛「Controller Fields for Contact Form 7」是 2023-05-08 上架。
- 目前有 40 個安裝啟用數。
- 上一次更新是 2024-12-02,距離現在已有 153 天。
- 外掛最低要求 WordPress 5.8 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
Dynamic | user-based | conditional | interactive | contact form 7 |
內容簡介
摘要:
Contact Form 7 是一個優秀的 WordPress 外掛程式,也是免費 WordPress 外掛程式中,最佳的聯絡表單選擇之一。Controller Fields 能夠為它添加動態內容功能,提供新的表單標籤,可用於控制其他欄位和內容的顯示,包括基於下拉菜單的當前值隱藏或顯示額外表單欄位、基於勾選框點擊隱藏或顯示內容,以及基於當前選定的單選按鈕隱藏或顯示信息,並可以嵌套控制和受控欄位。總之,使用此外掛程式會有無盡的可能性。
使用方式:
此外援程式創建三 (3) 個新表單標籤,用於控制其他表單標籤的顯示 (又稱“控制器”),以及一個特殊的表單標籤生成器按鈕,用於輸出所需的 HTML 包裝以包裝可控表單標籤。安裝並啟用此外掛程式後,創建或編輯 Contact Form 7 表單時,您將在頂部看到四個 (4) 個新按鈕:選擇控制器、勾選框控制器、單選按鈕控制器和受控表單標籤包裝器。它們的標籤生成器中的大多數選項將對 Contact Form 7 使用者來說是耳熟能詳的,但有一些升級。
問題與答案:
問題:何謂 Controller Fields 外掛程式?
答案:Controller Fields 是一個外掛程式,可以為 Contact Form 7 添加動態內容功能。
問題:Controller Fields 外掛程式如何實現控制表單欄位顯示?
答案:此外掛程式提供新的表單標籤,用於控制下拉菜單、勾選框和單選按鈕的顯示,以控制其他欄位和內容的顯示。
問題:使用 Controller Fields 外掛程式如何創建控制器?
答案:在安裝並啟用此外掛程式後,創建或編輯 Contact Form 7 表單時,您將看到四個新按鈕:選擇控制器、勾選框控制器、單選按鈕控制器和受控表單標籤包裝器,它們將用於創建控制器。
問題:如何在 Controller Fields 外掛程式中設置選項?
答案:此外掛程式提供三種定義選項的方法,第一種方法是簡單地輸入選項,每個選項都在新行中,例如:蘋果、香蕉、火龍果。第二種方法類似,但它允許您使用“|”分隔符,以更好地控制值和標籤,例如:fruit_1 | Apples、fruit_2 | Bananas、fruit_3 | Dragonfruit。第三種方法是基於動態生成,可以使用短代碼填充選項。
問題:如何在 Controller Fields 外掛程式中設置默認值?
答案:此欄位可以接受靜態文本或短代碼。如果使用短代碼,則與選項欄位中的語法相同,但此欄位還需要更多需求。
問題:Controller Fields 外掛程式中如何設置占位符?
答案:此外掛程式僅適用於選擇控制器表單標籤,此欄位可以接受靜態文本或短代碼。如果使用短代碼,則與選項欄位中的語法相同,但此欄位還需要更多需求。
問題:如何禁用表單的某個欄位?
答案:只需選中“Read Only Attribute”或“Disabled Attribute”的框即可禁用表單中的欄位。
原文外掛簡介
Contact Form 7 is an excellent WordPress plugin and one of the top choices of free WordPress plugins for contact forms. Controller Fields makes it even more awesome by adding dynamic content capabilities. This plugin provides new form tags for select fields, checkboxes, and radio buttons so you can use them to control the display of other fields and content. Some examples might include:
Hiding or revealing additional form fields based the current value in a dropdown
Hiding or revealing content when users click a checkbox
Hiding or revealing information based on which radio button is currently selected
Controllers and controlled fields can be nested
The possibilities are endless!
View Demo
Preview this plugin in the WordPress Playground, a sandbox environment where you can explore the features of this plugin, both in the WordPress backend as an admin user and on the frontend.
WHAT DOES IT DO?
This plugin creates three (3) new form tags for controlling the appearance of other form tags (aka “controller”) and a special form tag generator button to output the HTML needed to wrap the controllable form tags inside.
HOW TO USE IT
After installing and activating the plugin, you will have four (4) new buttons at the top when creating or editing a Contact Form 7 form: select controller, checkbox controller, radio controller, and controlled form tag wrapper. Most of the options in their tag generators will be familiar to Contact Form 7 users but there have been some upgrades.
Id Attribute
The frontend script relies on unique IDs for the controller form tags, so be sure to always set one!
Options
There are three (3) ways you can define your options. The first method is simply typing your options with each one on a new line, e.g.:
Apples
Bananas
Dragonfruit
The second method is similar, but it allows you more control over the value and label by using | to separate them, e.g.:
fruit_1 | Apples
fruit_2 | Bananas
fruit_3 | Dragonfruit
The third method is dynamic in that you can use a shortcode to populate your options with two important provisions:
The shortcode should NOT include the normal square brackets ([ and ]). So, instead of [my_shortcode key='value'] you would use my_shortcode key='value'.
Any parameters in the shortcode must use single quotes. That is: my_shortcode key='value' and not my_shortcode key="value"
Shortcodes used here should return a string value with the option or option group HTML.
Default value
This field can take static text or a shortcode. If using a shortcode, the same syntax applies from the options field. However, this field also has a few more needs:
The text/shortcode must first have apostrophes converted to it’s HTML entity code, '
After that, it must be URL encoded so that spaces become %20 and other non-alphanumeric characters are converted.
Placeholder
Only available for the select controller form tag, this field can take static text or a shortcode. If using a shortcode, the same syntax applies from the options field. However, this field also has a few more needs:
The text/shortcode must first have apostrophes converted to it’s HTML entity code, '
After that, it must be URL encoded so that spaces become %20 and other non-alphanumeric characters are converted.
Read Only Attribute
Simply check this box if you do not want to let users edit this field. It will add the readonly attribute to your form field.
Disabled Attribute
Simply check this box if you do not want to submit this field in the form. It will add the disabled attribute to your form field.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Controller Fields for Contact Form 7」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.2 | 1.1.0 | 1.1.1 | 2.0.0 | trunk |
延伸相關外掛(你可能也想知道)
Leaflet Map 》透過LeafletJS新增一個地圖:一個開源的JavaScript函式庫,提供適合行動裝置的互動地圖。預設的地圖圖磚是透過OpenStreetMap或MapQuest(需使用應用鍵)提供...。
Interactive Polish Map 》將波蘭地區列表轉換為時尚可點擊地圖的最佳方法。, 它不需要 Flash Player 或任何額外的外掛程式!, , 手工編寫,有效的 xHTML 和 CSS, 預載器, 似工具提示或...。
Mapplic Lite 》Mapplic 是市場上獨一無二的地圖軟體,具有廣泛的用途和獨特豐富的功能。作為一個真正多用途且完全可定制的地圖 WordPress 外掛,Mapplic 可以輕鬆將圖像和 S...。
Image Map Pro – Drag-and-drop Builder for Interactive Images – Lite 》Image Map Pro 是一個 WordPress 外掛,讓你可以建立互動影像。只需載入影像並在其上方繪製形狀 - 就是那麼簡單!, 功能:, , 自訂多邊形形狀(限制為1個), ...。
Interactive video, Quiz, Product recommendations, Video chat, Video maker 》互動視訊、測驗、產品推薦、視訊聊天、視訊製作, 互動視訊是一種新型溝通方式!, Tolstoy 簡單易用的互動視訊平台將引導觀眾找到最適合的內容。, 在電子商務...。
Interactive Image 》使用這款外掛可以輕鬆地創建帶有區域和熱點的互動圖像,這裡有一些範例。, 還可以在我的商店中查看其他 WordPress 專業外掛。。
WordPress Playground Block 》WordPress Playground 讓您可以在瀏覽器中直接執行 PHP 程式碼,並提供 Interactive Code Block 外掛,讓使用者可即時檢視 PHP 程式碼的執行結果,進一步加深...。
NEW! Interactive 3D Cube for Menu or Banner. No Coding, No Ads, All Themes. 》這是一款真正免費的 3D 方塊外掛,可以在您的網頁上用您選擇的圖像顯示互動式 3D 方塊。, 讓您的網站增添互動式 3D 方塊,可用於以下用途:, 1. 選單連結到內...。
Apester Interactive Content 》Apester 的 WordPress 外掛讓內容創作者輕鬆地在他們的 WordPress 文章中添加互動式、適合移動端的影片、投票、測驗或故事等功能,只需單擊一下即可無縫地嵌...。
Scientific and Interactive Blocks – inseri core 》- Inseri的願景是讓學者能夠在沒有任何先前知識的情況下設計網頁,以開放、可引用和互動的方式發布他們的研究成果,並結合自己的數據或任何公共數據庫。通過...。
XPAC Lottie Interactive Animations 》, 這個外掛專為下一代 WordPress 網站而設計,讓你能在古騰堡編輯器中(包括網站編輯器和 Widget 編輯器)隨處添加輕量級的 Lottie 動畫。此外,我們的外掛包...。
eko WordPress Plugin 》使用 eko WordPress 外掛完全掌控您的 eko 互動內容。, 存儲視頻 我們為您創建了一個自定義文章類型,供您存儲和預覽互動式視頻。, 輕鬆嵌入您的視頻 使用此...。
WordPress Console 》此外掛會在管理員選單新增「控制台(Console)」頁面,提供一個基於 JavaScript 的互動式控制台,載入 WordPress 環境,允許執行特定 PHP 代碼及 WordPress ...。
Foodle Add-On for Democracy Poll 》e providing the ability for users to create and maintain their own categories for enhanced result statistics, Mixed polls available where both chec...。
Voilà!Collage 》Voilà!Collage 是一個免費的互動拼貼工具。, 這個外掛讓您可以輕鬆地在文章中嵌入拼貼作品,並提供超越一般嵌入功能的多元選擇:, , 在任何螢幕上都能保持適...。