Skip to content

Conversation

@antopalidi
Copy link
Member

🎩 What? Why?

Adds a new “Maximum choices” field to multiple-choice questions in Elections.
This allows administrators to define how many options participants can select.

📌 Related Issues

Testing

  1. Create an Election with a multiple-choice question.
  2. Set Maximum choices to 3.
  3. Try selecting 4 options → selection is blocked and a notice appears.

📷 Screenshots

498240510-0e73a7f0-e21b-42e9-87cf-4f9c8a78be79

♥️ Thank you!

github-actions[bot]
github-actions bot previously approved these changes Oct 8, 2025
github-actions[bot]
github-actions bot previously approved these changes Oct 8, 2025
github-actions[bot]
github-actions bot previously approved these changes Oct 8, 2025
@antopalidi antopalidi marked this pull request as ready for review October 9, 2025 08:08
@antopalidi antopalidi requested a review from microstudi October 9, 2025 10:10
Copy link
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested and it works fine.

However I'm wondering if we should add some javascript to prevent clicking more than the available questions.

Right now it works by let it you choose whatever you want and then return an error on voting if not allowed:

Image

You have some opinion about this @carolromero ?

Copy link
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine, and I also like the way to inform the user if many options have been selected, with a unobtrusive message.

Image

@microstudi
Copy link
Contributor

Copy link
Member

@carolromero carolromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antopalidi great work! I also think the way to inform the voter is clear and unobtrusive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Have a field with a maximum number of options to select in the multiple-option question type in the election component

5 participants