v24
Get User Vote
<Object|null> getUserVote()
Returns plain object of votes per indices (each index starts with 0) if user has voted. Otherwise, returns null.
Example
Output
var vote = element.getUserVote();
if (vote !== null) {
console.log('User voted for option(s): ', vote);
} else {
console.log('User has not voted yet!');
}
{
0: 1,
2: 3,
3: 2
}
Copy link