[WordPress] 外掛分享: Google Forms

WordPress 外掛 Google Forms 的封面圖片。

內容目錄

前言介紹

  • 這款 WordPress 外掛「Google Forms」是 2011-09-09 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 7000 個安裝啟用數。
  • 上一次更新是 2018-08-05,距離現在已有 2464 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 有 51 人給過評分。
  • 論壇上目前有 1 個提問,問題解答率 0%

外掛協作開發者

mpwalsh8 |

外掛標籤

google | shortcode | google docs | spreadsheet | google forms |

內容簡介

這個外掛可以透過自訂文章或捷徑來獲取發佈在 Google 表單上的表格,並且移除 Google 包裝的 HTML,然後以 HTML 表單的方式嵌入你的部落格文章或頁面中。使用 Google 表單文章型別時,wpgform捷徑接受一個參數:id,這是表單的文章 ID。當使用已棄用的 gform 捷徑時,唯一必需的參數是form,其設置為 Google 表單 URL。建議但非必須,如果你不喜歡預設的 Google 文字,你也可以提供自訂的確認頁面 URL。確認頁面會取代預設的 Google 謝謝您 頁面並提供更好的 WordPress 網站整合。還有一些其他選項,請參閱文檔以瞭解更多詳情。

例如,假設你想要整合位於 https://docs.google.com/spreadsheet/viewform?hl=en_US&pli=1&formkey=ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678#gid=0(不是真實的 URL)的表單,可以在你的 WordPress 文章或頁面中使用以下捷徑:

[wpgform id='861']

[gform form='https://docs.google.com/spreadsheet/viewform?hl=en_US&pli=1&formkey=ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678#gid=0']

已棄用:使用 gform 捷徑已經被棄用,請改用 wpgform 捷徑。

目前,此外掛只支援公開發佈為「網頁」的 Google 表單。不支援私人 Google 表單。

演示

用法

隨著功能的添加,gform捷徑的使用變得越來越複雜(現在已經被棄用)。從版本 0.46 開始,第二個捷徑 wpgform 與自訂文章類型一起被引入,用於定義表單,取代了 gform 捷徑的使用。使用新的捷徑和自訂文章類型比原先gform 捷徑的複雜使用方式簡單得多。我們強烈建議使用者將使用方式遷移到新的捷徑和自訂文章類型。新功能只會添加到自訂文章類型的使用模型中。

WordPress Google 表單捷徑 wpgform 支援單一屬性。其他控制項是從自訂文章類型存儲的資訊派生出來的。

[wpgform id='' uid='']

注意:在上述語法中,包含在尖括號<>內的值表示您需要用適當的值替換的字串。請勿在您的字串中包含尖括號!

id:Google 表單自訂文章類型的數字 ID。
uid:一個唯一的字串(例如'A-'),用於確保表單元素 ID 屬性在多次出現在頁面上時是唯一的。 (可選)

Google 表單已棄用的捷徑 gform 支援多個屬性,可進一步控制和自定義 Google 表單。

[gform form='' confirm='' class='' legal='on|off' br='on|off' prefix='' suffix='' email='on|off' sendto='' style='redirect|ajax' spreadsheet='' unitethemehack='on|off']

注意:在上述語法中,包含在尖括號<>內的值表示您需要用適當的值替換的字串。請勿在您的字串中包含尖括號!

form:已發佈的 Google 表單的完整 URL。你必須能夠從瀏覽器成功地打開此 URL。
confirm:確認頁面的全程 URL。
class:表單的 CSS 類。
legal:是否顯示或隱藏版權和法律文本。
br:是否顯示或隱藏表單中的斷行符號。
prefix:表單中所有元素 ID 的前綴。
suffix:表單中所有元素 ID 的後綴。
email:是否啟用表單提交時的電子郵件功能。
sendto:表單提交後的目標電子郵件地址。
style:表單提交後的頁面跳轉方式。
spreadsheet:已連結的 Google 試算表的全程 URL。
unitethemehack:是否啓用非洲主題 hack。

原文外掛簡介

Fetches a published Google Form using a WordPress custom post or shortcode, removes the Gooogle wrapper HTML and then renders it as an HTML form embedded in your blog post or page. When using Google Form post type, the wpgform shortcode accepts one parameter, id, which is the post id of the form. When using the deprecated gform shortcode, the only required parameter is form which is set to the URL to the Google Form URL. Recommended but optional, you can also provide a custom URL for a confirmation page if you don’t care for the default Google text. The confirmation page will override the default Google Thank You page and offers better integration with your WordPress site. There are a number of other options, refer to the documentation for further details.
For example, suppose you want to integrate the form at https://docs.google.com/spreadsheet/viewform?hl=en_US&pli=1&formkey=ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678#gid=0, (not a real URL) use the following shortcode in your WordPress post or page:
[wpgform id='861']

[gform form='https://docs.google.com/spreadsheet/viewform?hl=en_US&pli=1&formkey=ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678#gid=0']

Deprecated: use of the gform shortcode is deprecated – please use the wpgform shortcode.
Currently, this plugin only supports Google Forms that are “Published as a web page” and therefore public. Private Google Forms are not supported.
Demo
Usage
As features have been added, usage of the gform shortcode has grown increasing complex (the gform shortcode is now deprecated). Begining with v0.46, a second shortcode, wpgform has been introduced in conjunction with a Custom Post Type to define forms deprecating usage of the gform shortcode. Usage of the new shortcode and Custom Post Type is much, much easier than the complexities of the original gform shortcode. Users are strong encouraged to migrate usage to the new shortcode and Custom Post Type. New features will only be added to the Custom Post Type usage model.
The WordPress Google Form shortcode wpgform supports a single attribute. The rest of the controls are derived from the information stored with the Custom Post Type.
[wpgform id='' uid='']

NOTE: In the above syntax, values enclosed in angle brackets , indicate a string you need to replace with an appropriate value. Do not include the angle brackets in your string!

id: The numeric id of the Google Form Custom Post Type.
uid: A unique string (e.g. ‘A-‘) used to ensure form element ID attributes are unique when a form appears on a page multiple times. (optional)

The Google Form deprecated shortcode gform supports a number of attributes that allow further control and customization of the Google Form.
[gform form='' confirm='' class='' legal='on|off' br='on|off' prefix='' suffix='' email='on|off' sendto='' style='redirect|ajax' spreadsheet='' unitethemehack='on|off']

NOTE: In the above syntax, values enclosed in angle brackets , indicate a string you need to replace with an appropriate value. Do not include the angle brackets in your string!

form: The full URL to the published Google Form. You must be able to open this URL successfully from a browser for the gform shortcode to work properly.
confirm: A full URL to the confirmation (e.g. Thanks for your submission!) page. Be default Google displays a very basic confirmation page which cannot be integrated easily with your WordPress site. The confirm attribute allows the form submission to land on a page of your choosing. It is strongly encouraged that you make use of a confirmation page. It will make the form submission process cleaner and clearer to the end user. The confirmation page will be displayed by a page redirect unless a different behavior is specified using the style attribute.
style: Specify how the custom confirmation page should be presented. Legal values for the style attribute are redirect and ajax (e.g. style=’redirect’ or style=’ajax’).
alert: A message to display upon successful form submission in a Javascript Alert box (e.g. Thanks for your submission!).
class: Google Forms are full of classes but the WordPress Google Form plugin does not bring their definitions into page when importing the form. The class attribute allows the addition of one or more CSS classes to the DIV which wraps the Google Form. To add multiple classes, simply separate the class names with spaces.
legal: By default Google Forms have a Powered by Google Docs section at the bottom of the form which includes links to Google TOS and other Google information. If you do not want to see this information as part of the form, add legal='off' to your shortcode usage. The content remains in the form, it is simply hidden from the end user using CSS.
br: For a
tag to be inserted between the form label and the input text box by setting the br attribute to on. This will result in the form label and the input box being stacked on top of one another.
prefix: Google Forms make use 20+ CSS classes. If you use multiple forms and want to style them each differently, you can add a prefix which will be added to beginning of each class name used in the Google Form.
suffix: Append a character string to the end of each form label. This can also be accomplished using CSS, refer to the CSS section.
title: By default Google Forms have title wrapped in a

tag. If you do not want to include this form title as part of the form, add title='off' to your shortcode usage. The

content is removed from the form.
maph1h2: By default Google Forms have title wrapped in a

tag. If you want the form title but not as an

element, add maph1h2='on' to your shortcode usage. The

elements will be mapped to

elements. The CSS class attributes remain unchanged.
email: Notify the site’s WordPress administrator (or sendto email address) that a form has been submitted by setting the email attribute to on. This will result in an email being sent to the blog administrator (or sendto email address) letting them know a form was submitted with the URL of the form along with the date and time of submission.
sendto: Notify the “sendto” email address that a form has been submitted by setting the email attribute to on. This will result in an email being sent to the “sendto” letting them know a form was submitted with the URL of the form along with the date and time of submission. The email message will always be sent to the blog administrator via Bcc.
spreadsheet: The full URL to the “Shared” Google Docs Spreadsheet which stores the form responses. You must be able to open this URL successfully from a browser for the link in the email to work properly. This attribute is used in conjunction with the email attribute, it has no effect when the email attribute is not turned on.
unitethemehack: Off by default, this attribute should be enabled, unitethemehack='on', when using the Unite theme from Paralleus. The Unite theme manipulates the submit button(s) on a page, the result of which is a button that prevents the Google form from being submitted. Turning this attribute on enables a hack which inserts class=”noStyle” to all submit buttons, preventing Unite from mucking with them.
validation: Off by default, this attribute can be enabled, validation='on', to add jQuery based form validation support using the jQuery Validate Plugin. Enabling this optional attribute will allow inline checking without form submission to Google (which also does checking for required fields). Error messages can be styled using the gform-error CSS class.
captcha: Off by default, this attribute can be enabled, captcha='on', to add a simple math based CAPTCHA to the Google Form. The CAPTCHA only appears for the final submit on multi-page forms. The CAPTCHA error message can be styled using the gform-error CSS class.

columns: The number of columns the form should be split into. By default the form appears in a single column the same way it is designed in Google Docs.
[gform form=’https://docs.google.com/spreadsheet/viewform?hl=en_US&pli=1&formkey=ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678#gid=0′ confirm=’http://www.example.com/thankyou/’ style=’ajax’ class=’mygform’ legal=’off’ prefix=’mygform-‘ br=’on’ title=’on’ maph1h2=’on’ email=’on’ spreadsheet=’https://docs.google.com/spreadsheet/ccc?key=0AgBHWDGsX0PUdE56R1ZldXo4a0N3VTNMNEpSemdGV3c’ unitethemehack=’off’ validation=’on’ captcha=’on’ columns=’1′]
License
This plugin is available under the GPL license, which means that it’s free. If you use it for a commercial web site, if you appreciate my efforts or if you want to encourage me to develop and maintain it, please consider making a donation using Paypal, a secured payment solution. You just need to click the donate button on the the plugin overview page and follow the instructions.

CSS
Google Forms make use of 20+ CSS class definitions. By default, the WordPress Google Form plugin includes CSS declarations for all of the classes however the bulk of them are empty. The default CSS sets the font and makes the entry boxes wider. The default CSS that ships with WordPress Google Form can optionally be turned off via the WordPress Google Form settings.
Customizing Google Form CSS
There are two ways to customize the Google Form CSS.

The WordPress Google Form plugin includes a setting to include custom CSS and a field where custom CSS can be entered. This CSS will be preserved across themes.
Add custom CSS declarations to your WordPress theme.

Default Google Form CSS
As of 2013-12-04, the following is are the CSS classes which Google Forms make use of. The CSS below represents the default CSS provided by WordPress Google Form. These CSS definitions can be copied and pasted into your theme CSS or the WordPress Google Form custom CSS setting and changed as desired. Some of the classes are redundant to account for both the new and old style of Google Forms.
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
* CSS declarations for Google Docs Forms
*
* These can be copied and modified to fit the needs of
* a theme. By default the only change is to make all of
* the fields wider than their default width and to set the
* default font.
*/

label.gform-error,
label.wpgform-error {
float: right;
color: red;
font-weight: bold;
}

div.gform-captcha,
div.wpgform-captcha {
margin: 5px 0px 10px;
display: none;
}

div.gform-browser-warning,
div.gform-browser-error,
div.wpgform-browser-warning,
div.wpgform-browser-error {
-webkit-border-radius: 3px;
border-radius: 3px;
border-width: 1px;
border-style: solid;
padding: 0 .6em;
margin: 5px 0 15px;
}

div.gform-browser-warning,
div.wpgform-browser-warning {
background-color: #ffffe0;
border-color: #e6db55;
}

div.gform-google-error,
div.gform-browser-error,
div.wpgform-google-error,
div.wpgform-browser-error {
background-color: #ffebe8;
border-color: #cc0000;
}

body.ss-base-body {}
div.errorbox-good {}
div.ss-attribution {}
div.ss-footer {}
div.ss-footer-txt, div.ss-logo {
display: none;
}

div.ss-form {}
div.ss-form-container {
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
div.ss-form-desc {}
div.ss-form-entry {}
div.ss-form-entry>input {
background-color: #e0e0e0;
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
div.ss-form-heading {}
div.ss-item {}
div.ss-legal {}
div.ss-navigate {}
div.ss-no-ignore-whitespace {
white-space: pre-wrap;
}
div.ss-required-asterisk {
color: red;
font-weight: bold;
}
div.ss-scale {}
div.ss-text {}
form#ss-form {}
h1.ss-form-title {}
hr.ss-email-break {}
input.ss-q-short:text {
width: 300px;
}
label.ss-q-help {
display: block;
}
label.ss-q-radio {}
label.ss-q-title {
font-weight: bold;
}
span.ss-powered-by {}
span.ss-terms {}
td.ss-gridnumber {}
td.ss-gridnumbers {}
td.ss-gridrow
td.ss-gridrow-leftlabel
td.ss-leftlabel {}
td.ss-rightlabel {}
td.ss-scalerow {}
td.ss-scalenumber {}
td.ss-scalenumbers {}
textarea.ss-q-long {
background-color: #e0e0e0;
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
tr.ss-gridrow {}

/**
* New Google Forms CSS 2013-04-30
*/

div.ss-form-container div.disclaimer {
display: none;
}

div.ss-q-help {
}

div.ss-secondary-text {
}

/* This hides the "Never submit passwords through Google Forms." warning. */
td.ss-form-entry > div.ss-secondary-text {
display: none;
}

div.password-warning {
display: none;
}

div.ss-form-container li {
list-style-type: none;
}

/* 2013-06-04: Hide "Edit this Form" link */
a.ss-edit-link {
display: none;
}

/* 2013-06-06: Hide help text for scales */
div.aria-only-help {
display: none;
}

/* 2013-10-30: Hide default error messages */
div.error-message {
display: none;
}

/* 2013-10-30: Attempt to make text entry boxes a reasonable width */
input.ss-q-short, textarea.ss-q-long {
width: auto;
}

/* 2013-11-15: CSS to support using WordPress Google form to render spreadsheets */

/** Hide the gunk that Google adds to make the table work **/
td.hd, td.headerEnd, tr.rShim, td.sortBar {
display: none;
width: 0px !important;
padding: 0px !important;
}

/** Empty selector but could be used to select all of the table cells **/
tr.rShim td, tr.rShim ~ tr td {
}

/** Hide the "powered" and "listview" DIVs that Google adds **/
div div span.powered, div.listview {
display: none;
}

/** Hide the "This is a required question" message **/
div.ss-form-container div.required-message {
display: none;
}

各版本下載點

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

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


0.9 | 0.10 | 0.11 | 0.12 | 0.13 | 0.14 | 0.15 | 0.16 | 0.17 | 0.18 | 0.19 | 0.20 | 0.21 | 0.22 | 0.23 | 0.24 | 0.25 | 0.26 | 0.27 | 0.28 | 0.30 | 0.32 | 0.33 | 0.34 | 0.35 | 0.36 | 0.37 | 0.38 | 0.39 | 0.40 | 0.41 | 0.42 | 0.43 | 0.44 | 0.45 | 0.47 | 0.48 | 0.49 | 0.50 | 0.51 | 0.52 | 0.53 | 0.54 | 0.55 | 0.56 | 0.57 | 0.58 | 0.59 | 0.60 | 0.61 | 0.62 | 0.63 | 0.64 | 0.65 | 0.66 | 0.67 | 0.68 | 0.69 | 0.70 | 0.71 | 0.72 | 0.73 | 0.74 | 0.75 | 0.76 | 0.77 | 0.78 | 0.79 | 0.80 | 0.81 | 0.82 | 0.83 | 0.84 | 0.85 | 0.86 | 0.88 | 0.89 | 0.90 | 0.91 | 0.92 | 0.93 | 0.94 | 0.95 | trunk | v0.11 |

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

  • TablePress – Tables in WordPress made easy 》TablePress 是最受歡迎和評分最高的 WordPress 表格外掛程式。它允許您輕鬆地在您的網站上創建和管理美麗的表格。您可以使用區塊編輯器在文章、頁面或其他網...。
  • Ninja Tables – Easy Data Table Builder 》詳細功能 | Youtube 影片教學 | 示範 | 使用者指南, 建立美觀響應式表格一向是一個困難的事情。而客製化這些表格甚至更是爭論不休。, 所以,如果您正在尋找...。
  • Data Tables Generator by Supsystic 》使用這個 WordPress 外掛可以創建帶有排序、搜索、分頁、過濾等功能的響應式數據表格,還可以管理數據、圖表等。您可以通過訪問這裡的數據表格範例深入瞭解。...。
  • WooCommerce Bulk Edit Products – WP Sheet Editor 》商品批次編輯器,可以快速編輯 WooCommerce 商品,也可以批量創建商品。, , 使用案例, , WooCommerce 商店:您可以在單一頁面上查看所有商品, 您想要快速創建...。
  • Inline Google Spreadsheet Viewer 》可以輕易地將存儲在Google電子表格、CSV檔案、MySQL數據庫或Google Apps Script輸出中的數據轉換為美麗的互動圖表或圖形、可排序和可搜索的表格或兩者兼備。...。
  • Bulk Edit Posts and Products in Spreadsheet 》一個專門為WordPress設計的電子表格。使用電子表格大量編輯文章。, , 它適用於古騰堡(新編輯器)和經典編輯器, 您可以使用古騰堡編輯器直接在電子表格中編輯...。
  • CSV Importer 》此外掛可以將 CSV(逗號分隔值)檔案中的文章匯入 WordPress 網誌。當您要從 Excel 文件或類似文件匯入一堆文章時,這是非常有用的工具 - 只需將文件匯出成 C...。
  • Bulk Edit Categories and Tags – Create Thousands Quickly on the Editor 》此外掛可提供 WordPress 批次編輯功能,讓你能夠查看和編輯所有的網誌分類和標籤。你不需要導出或匯入,只需編輯、保存,所有更改即時套用。, 你可以在表格中...。
  • Spreadsheet Integration – Automate Google Sheets With WordPress, WooCommerce & Most Popular Form Plugins. Also, Display Google sheet as a Table. 》egistration, delete user, user login, user logout, new post, update post, new page, and new database table row events with Advanced Custom Fields f...。
  • WP CSV to Database – Insert CSV file content into WordPress database 》WP CSV to Database 外掛能夠讓你將 CSV 檔案內容插入 WordPress 資料庫,你可以選擇性地插入資料到特定的資料庫表格中。, 此外,你也能夠使用這個外掛匯出任...。
  • Bulk Edit and Create User Profiles – WP Sheet Editor 》1; Sortear la lista de usuarios por nombre, correo electrónico y cualquier campo en el perfil, – Editar todos los campos básicos en el perfil...。
  • Import Spreadsheets from Microsoft Excel 》「從 Microsoft Excel 匯入試算表」是一款 WordPress 的外掛,它可以讓您將 Microsoft Excel 中的即時計算試算表匯入到 WordPress 的博客或網站中。該外掛是...。
  • WooCommerce Bulk Edit Coupons – WP Sheet Editor 》快速編輯 WooCommerce 優惠券。您也可以批量創建優惠券。, , 使用場景, , WooCommerce 商店 : 您可以在單個頁面上查看所有優惠券, 您想要快速創建大量優惠券,...。
  • Sheet2Site 》Sheet2Site – 在你的 WordPress 網站中嵌入你的 Google 表單。, 現在,我們通過 Sheet2Site WordPress 插件為您現有的網站帶來 Sheet2Site 的強大功能...。
  • Spreadsheet Paste Block 》您可以直接從試算表 (例如 Google Sheets 或 LibreOffice Calc) 複製儲存格並貼到這個區塊。儲存格將會被正確地顯示和格式化。。

文章
Filter
Apply Filters
Mastodon