Open wjhdev opened 9 years ago
I think the best route with this is is two shortcodes, something along the lines of
[poll name="student-choice-2015]
[poll-question question="Best Bar" choice="1" choice="2" ...]
[/poll]
this way we can make sure all the questions are within a <form> </form>
element
Yeah. That's kind of what I was thinking too.
Although for the question=
attribute, I would use a slug encoding. Let's just use h3 headers to print the text of the question.
So:
[poll name="student-choice-2015"]
<h3>Best Bar</h3>
[poll-question question="best-bar" choice="1" choice="2" ...]
Do we need an "end poll" option too? We're going to have to figure out how to avoid the same identifier being used multiple times. Maybe append the post id to the end of it in the database?
Create shortcode to output a radio input block. Something like:
[poll-question poll="student-choice-2015" choice="1" choice="2" choice="3" ...]