SummaryParameters
Summary
The Polls shortcode uses the standard Gravity Forms shortcode but introduces a new action that tells Gravity Forms to make the form behave as a poll. The Polls shortcode can be used anywhere within WordPress where shortcodes are supported. For most users, this will primarily be within the content of a WordPress post or page.
Here is an example Poll shortcode showing passed parameters.
1[gravityform action="polls" id="1" mode="poll" style="red" cookie="1 month" show_results_link="true" display_results="true" percentages="true" counts="true" ]
Parameters
ParameterDescriptionidThe id of the form to be embedded. (required)modeYou can choose to display the poll or just the results of the poll. Supported modes: poll or results. Defaults to 『poll』. (optional)titleShows or hides the form title. Defaults to true.descriptionShows or hides the form description. Defaults to true.confirmationEnables or disables the confirmation message on the form. Defaults to false.styleThe add-on currently supports four built in styles: red, green, orange, blue. Defaults to 『green』. (optional)cookieSets a time period to restrict repeat voting, using a browser cookie. Options are 1 day, 1 week, 1 month, or a specific date in the YYYY-MM-DD date format. Defaults to an empty string, which means repeat voting is permitted.show_results_linkDisplay a link to view poll results without submitting the form. Supported values are: true, false. Defaults to 『true』. (optional)display_resultsDisplay poll results automatically when the form is submitted. Supported values are: true, false. Defaults to 『true』. (optional)ajaxEnables or disabled AJAX submission of the poll. Defaults to false.percentagesDisplay results percentages as part of results. Supported values are: true and false. Defaults to 『true』. (optional)countsDisplay number of times each choice has been selected when displaying results. Supported values are: true, false. Defaults to 『true』. (optional)tabindexSets a custom tab index on the poll. Accepts numerical values.
Most of the parameters available for the Polls shortcode action are optional. A form can be presented as a poll without including most of these parameters.