=== Plugin Name === Contributors: mpwalsh8 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DK4MS3AA983CC Tags: Google Forms, Google Docs, Google, Spreadsheet, shortcode, forms Requires at least: 3.0 Tested up to: 3.3.1 Stable tag: 0.21 Embeds a published, public Google Form in a WordPress post, page, or widget. == Description == Fetches a published Google Form using a `[gform form='']` WordPress shortcode, removes the Gooogle wrapper HTML and then renders it as an HTML form embedded in your blog post or page. The only required parameter is `form`, which specifies the form you'd like to retrieve. Recommended but optional, you can also pass a URL for a confirmation page. The confirmation page will override the default Google`Thank You` page and offers better integration with your WordPress site. You can also supply a customized `class` value for styling the form. 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: [gform form='https://docs.google.com/spreadsheet/viewform?hl=en_US&pli=1&formkey=ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678#gid=0'] Currently, this plugin only supports Google Forms that are "Published as a web page" and therefore public. Private Google Forms are not supported. [Demo](http://michaelwalsh.org/wordpress/wordpress-plugins/wpgform/) == Installation == 1. Install using the WordPress Pluin Installer (search for `WordPress Google Form`) or download `WordPress Google Form`, extract the `wpgforms` folder and upload `wpgforms` to the `/wp-content/plugins/` directory. 1. Activate the plugin through the 'Plugins' menu in WordPress. 1. Configure `WP Goolge Forms` from the `Settings` menu as appropriate. 1. Use the `[gform form='']` shortcode wherever you'd like to insert the Google Form. == Usage == The WordPress Google Form 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='']` * __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. * __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 <h1> tag. If you do not want to include this form title as part of the form, add `title='off'` to your shortcode usage. The <h1> content is removed from the form. * __maph1h2__: By default Google Forms have title wrapped in a <h1> tag. If you want the form title but not as an <h1> element, add `maph1h2='on'` to your shortcode usage. The <h1> elements will be mapped to <h2> elements. The CSS class attributes remain unchanged. `[gform form='https://docs.google.com/spreadsheet/viewform?hl=en_US&pli=1&formkey=ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678#gid=0' confirm='http://www.example.com/thankyou/' class='mygform' legal='off' prefix='mygform-' br='on' title='on' maph1h2='on']` == Frequently Asked Questions == = The default style is ugly. Can I change it? = Yes, there are two ways to change the style (aka apearance) of the form. 1. By adding the necessary CSS to your theme's style sheet. 1. Through the WordPress Google Form custom CSS setting. Google Forms include plenty of [CSS](http://en.wikipedia.org/wiki/Cascading_Style_Sheets) hooks. Refer to the **CSS** section for further details on styling the form. There are also some CSS solutions posted to questions users have raised in the Tips and Tricks section of [this page](http://michaelwalsh.org/wordpress/wordpress-plugins/wpgform/tips-and-tricks/). = Do you have a demo running? = Yes, see a demo here: [Demo of WordPress Google Form plugin](http://michaelwalsh.org/wordpress/wordpress-plugins/wpgform/) Feel free to submit a response and then view other responses as well. = Content appears, but it's not my form and it looks odd! Why? = You should triple-check that you've published your Form. Google provides instructions for doing this. Be sure to follow steps 1 and 2 in [Google Spreadsheets Help: Publishing to the Web](http://docs.google.com/support/bin/answer.py?hl=en&answer=47134) as the same process applies to Forms and Spreadsheets. = Why doesn't my form look the same as it does when I use the stand alone URL? = Google Forms can have _Themes_ which are really nothing more than CSS defitinions to change the form's appearance. None of the Google CSS is brought into WordPress, just the CSS class names and the HTML used to define the form. Refer to the **CSS** section for more information on styling your form. = Google supports embedding forms, why isn't that sufficient? = For many uses the simple embedding of a Google Form in an `