The Poll 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 Poll 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.
[gravityform action="polls" id="1" mode="poll" style="red" cookie="1 month" show_results_link="true" display_results="true" percentages="true" counts="true"]
The id of the form to be embedded. (required)
You can choose to display the poll or just the results of the poll. Supported modes: poll or results. Defaults to ‘poll’. (optional)
Shows or hides the form title. Defaults to true.
Shows or hides the form description. Defaults to true.
Enables or disables the confirmation message on the form. Defaults to false.
The Add-On currently supports 4 built in styles: red, green, orange, blue. Defaults to ‘green’. (optional)
Enables blocking of repeat voters. You enable this by passing a defined time period. Available time periods 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 no repeat voters are blocked.
Display a link to view poll results without submitting the form? Supported values are: true, false. Defaults to ‘true’. (optional)
Display poll results automatically when the form is submitted? Support values are: true, false. Defaults to ‘true’. (optional)
Enables or disabled AJAX submission of the poll. Defaults to false.
Display results percentages as part of results? Support values are: true, false. Defaults to ‘true’. (optional)
Display number of times each choice has been selected when displaying results? Support values are: true, false. Defaults to ‘true’. (optional)
Sets a custom tab index on the poll. Accepts numerical values.
Most of the parameters available for the Poll shortcode action are optional. A form can be presented as a Poll without including most of these parameters. For example, to present a form as a poll using a minimal number of options and relying on defaults you could use the following: