Hi, I'm working on implementing a poll system with a variable number of choices that a user can vote form (via a submission form). Currently, each poll question is stored as a page with each choice being a child of the Poll page (as seen below). Additionally, each choice has a "votes" field which tracks the number of votes a particular choice gets.
--Poll
----Choice 1
----Choice 2
----Choice 3
However, I'm unsure how to limit the number of times a user can vote on a particular poll. Ideally, I would like to allow a user to vote once a day (every 24 hours), so I'm assuming I would have to do this by logging the user's IP address each time a vote is cast. I'm assuming that this would need to be done automatically by the voting function and I would need to track this by adding a "Vote Tracker" child page or something similiar and adding child votes to it each time that would include an IP address and the date/time it was cast, however this seems a bit cumbersome, especially as I would need to make sure there was a "Vote Tracker" child for each Poll, sort of as seen below:
--Poll
----Choice 1
----Choice 2
----Choice 3
----Vote Tracker
------Vote1 (contains IP address)
------Vote2
------Vote3
------...etc
I guess I'm just curious if there is a better way to do this, or if there is any way to attach an array to each poll that could store the same information.
Thanks!