Hey!
If I build a poll, it displays properly.
- Poll
- Jumbled text
But if I build a poll within Details, it appears as jumbled text.
Hide Details
- Poll
- Jumbled Text
Is this an error?
A user, kaidenh, encountered an issue with polls within the “Hide Details” feature, where the poll appears as jumbled text. JammyDodger provided a solution, explaining that the poll code needs to be on a line by itself and offering a workaround using HTML hide details and Discourse poll code. kaidenh successfully implemented the solution and thanked JammyDodger for their help.
Hey!
If I build a poll, it displays properly.
But if I build a poll within Details, it appears as jumbled text.
Is this an error?
Ooh, I know the answer to this one. ![]()
It’s because you need the poll code to be on a line all by itself. You can mix html hide details and the discourse poll code to get the results you want:
<details>
<summary>
Hidden Poll
</summary>
[poll type=regular results=always chartType=bar]
* Option 1
* Option 2
[/poll]
</details>
Example:
Edit: After my giddy rush of excitement at posting my first message I’ve gone back and had a look at what happens with the standard hide details, as you can definitely put the poll in with white space above and below.
For some reason it mixes the [/poll] and [/details] codes together at the end. No idea if this is desired, but the workaround above works if you need it. ![]()
Thank you @JammyDodger