Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Add MultipleChoice field. #27

Description

@lovelydinosaur

Display as a <select multiple>

Activity

  1. jhtimmins commented on Mar 7, 2019

    @jhtimmins
    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.

  2. lovelydinosaur commented on Mar 7, 2019

    @lovelydinosaur
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions