Enables widgets to use Polls
Methods
Get
Gets a poll.
Velocity
#set($pollResponse = $core_v2_poll.Get($id))
JavaScript
var pollResponse = core_v2_poll.Get(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Guid | Id | Required |
Returns
GetSummary
Gets a poll summary.
Velocity
#set($voteSummaryResponse = $core_v2_poll.GetSummary($pollId))
JavaScript
var voteSummaryResponse = core_v2_poll.GetSummary(pollId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
pollId | Guid | Poll Id | Required |
Returns
GetVote
Gets the current user's vote on a poll. Will return null if user hasn't voted.
Velocity
#set($nullableResponse = $core_v2_poll.GetVote($pollId))
JavaScript
var nullableResponse = core_v2_poll.GetVote(pollId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
pollId | Guid | Poll Id | Required |
Returns
Nullable of Guid
Vote
Casts a vote on the specified option for the current user.
Velocity
$core_v2_poll.Vote($pollId, $optionId)
JavaScript
core_v2_poll.Vote(pollId, optionId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
pollId | Guid | Poll Id | Required | ||
optionId | Guid | Option Id | Required |