內容簡介
TukuToi Contact Form 外掛能讓你在 WordPress 網站的任何頁面、文章或自訂文章中加入簡單的聯絡表單。
你可以使用帶有屬性的簡碼 [tkt_cntct_frm_contact_form] 來設定聯絡表單的不同方面,例如:
– 表單 ID
– 姓名輸入欄位的標籤
– 電子郵件輸入欄位的標籤
– 主旨輸入欄位的標籤
– 訊息輸入欄位的標籤
– 送出按鈕的標籤
– 必填欄位錯誤訊息
– 電子郵件格式錯誤訊息
– 成功訊息
為什麼我們需要另一個聯絡表單外掛?已經有太多聯絡表單外掛了!
因為大多數聯絡表單外掛都成為了實際的表單建立工具,讓你可以建立任何形式的表單。
當然,這很棒,但這也意味著「聯絡表單」的實際目的,即用作「寄送電子郵件給我」的包裝,在大多數「聯絡表單」外掛中被打敗了。
TukuToi Contact Form 名符其實,正好做到了這一點。
它讓你透過簡碼將最簡單的聯絡表單添加到你的網站上。
沒錯,沒有表單建立工具、複雜的驗證或 Captcha 設置(外掛已內建 honeypot 防止機器人)。
透過最小限度的簡碼屬性,你可以控制表單的視覺外觀(標籤和成功/錯誤訊息)。
透過一系列過濾器和動作,你可以進一步控制表單及其行為,幾乎涵蓋了它所執行或使用的每個動作和字串。
這些過濾器和動作通常被「包裝」成一個圖形用戶界面(GUI),以供任何人輕鬆更改這些設置,但這也會增加膨脹,並鼓勵要求更多微小的功能,這些功能再一個接一個地添加,最終讓聯絡表單外掛變成了實際的表單建立工具。
因此,我們明確地決定不為此插件提供 GUI。
此外,保持插件的最小化、目標化和不使用任何高級功能,使它與 WordPress 4.x 至未來的任何版本兼容,而不必使它們兩者分開。
因此,這個外掛也與 ClassicPress 和 WordPress 兼容。
注意:每個頁面或文章只能插入一個聯絡表單。
簡碼屬性
id。表單 ID。如果未傳遞,則默認為 1。在使用引用此 ID 的過濾器或動作時,必須設置。只接受文本或數值。可以是字符串或數值(儘管我們建議使用字符串,因為它也用作表單 HTML ID)。
label_name。姓名輸入欄位的標籤。預設為「你的姓名」。只接受文本。
label_email。電子郵件輸入欄位的標籤。預設為「你的電子郵件地址」。只接受文本。
label_subject。主旨輸入欄位的標籤。預設為「主旨」。只接受文本。
label_message。訊息輸入欄位的標籤。預設為「你的訊息」。只接受文本。
label_submit。送出按鈕的標籤。預設為「提交」。只接受文本。
error_empty。空欄位的錯誤訊息。預設為「請填寫所有必填欄位。」。只接受文本。
error_noemail。空或無效的電子郵件輸入欄位的錯誤訊息。預設為「請輸入有效的電子郵件地址。」。只接受文本。
success。在電子郵件成功發送時顯示的成功訊息,替代表單。預設為「Th
外掛標籤
開發者團隊
原文外掛簡介
TukuToi Contact Form Plugin lets you add a simple Contact Form to any Page, Post or Custom Post of your WordPress Website.
Using the ShortCode [tkt_cntct_frm_contact_form] with attributes you can configure several aspects of the Contact Form, such as:
– Form ID
– Label for the Name Input
– Label for the Email Input
– Label for the Subject Input
– Label for the Message Input
– Label for the Send Button
– Error message for required Fields
– Error for invalid Emails
– Success message
Why would we need one more Contact Form Plugin? There are too many Contact Form Plugins already!
Because most Contact Form Plugins are/became actual Form Builders, that let you create any kind and sort of Form.
Which is great, of course, but it also means the actual purpose of the “Contact Form”, being a wrapper for the “Email Me” link, got sort of defied in most “Contact Form” Plugins.
TukuToi Contact Form does exactly what its name suggests.
It lets you add simplest of Contact Forms to your Website thru a ShortCode.
That’s it. There’s no Form Builder, complex validation or Captcha Settings (there’s a honeypot against robots, inbuilt in the plugin).
With a minimal set of ShortCode attributes you can control the visual aspects of the Form (Labels and Success/Error messages).
Thru a set of Filters and Actions you can further control the Form and its behaviour, down to almost every action and string it does or uses.
These Filters and Actions usually get “wrapped” into a Graphical User Interface (GUI) for anyone to easily change those settings, however that also adds bloat, and encourages to ask for more tiny features, which one added to another, end up making the Contact Form Plugins be actual Form Builders.
Thus a clear decision was made to not provide a GUI for this plugin.
Furthermore, keeping the plugin minimal, targeted and not using any advanced features, we can keep it compatible with WordPress versions from 4.x up to any version to come, without having to make a split between the worlds.
This plugin therefore is compatible with ClassicPress, as well as with WordPress.
Note: Only one Contact Form can be inserted each page or post.
ShortCode Attributes
id. ID of the Form. Defaults to 1 if not passed. Must be set when using Filters or actions referring to this ID, Accepts only text or numeric value. Can be string or numeric (although we recommend string, since it is used as the Form HTML ID as well).
label_name. Label of Name Input. Defaults to “Your Name”. Accepts only text.
label_email. Label of the Email Input. Defaults to “Your E-mail Address”. Accepts only text.
label_subject. Label of the Subject Input. Defaults to “Subject”. Accepts only text.
label_message. Label of the Message Input. Defaults to “Your Message”. Accepts only text.
label_submit. Label for the Submit Button. Defaults to “Submit”. Accepts only text.
error_empty. Error message for empty field(s). Defaults to “Please fill in all the required fields.”. Accepts only text.
error_noemail. Error message for empty or invalid Email Input. Defaults to “Please enter a valid e-mail address.”. Accepts only text.
success. Success message shown instead of the Form when the email was sent successfully. Defaults to “Thanks for your e-mail! We’ll get back to you as soon as we can.”. Accepts only text.
