Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MultipleChoice field. #27

Open
tomchristie opened this issue Mar 4, 2019 · 2 comments
Open

Add MultipleChoice field. #27

tomchristie opened this issue Mar 4, 2019 · 2 comments

Comments

@tomchristie
Copy link
Member

Display as a <select multiple>

@jhtimmins
Copy link
Contributor

Seems like this could either subclass Choice or inherit from Field directly. Do you have a preference?
Also, I'm thinking it should include "min selected" and "max selected" as options. Anything else?

I'm happy to work on other fields/issues first if they're higher priority.

@tomchristie
Copy link
Member Author

I'd suggest:

  • Subclass Field.
  • Don't include min selected / max selected, at least for the initial pass. That can come later.

We'll want to think carefully about null and empty behaviors, eg:

  • We won't want to render an initial blank <choice> in the multiple case.
  • Forms with no values selected won't submit any value at all. For consistency we probably want MultipleChoice(default=[]) to be the typical usage - similar to BooleanField(default=False) being the correct way to have a checkbox that acts as False if it does not submit a value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants