Skip to content

SelectField choice cannot be False #878

@AstraLuma

Description

@AstraLuma
    joinlist = SelectField('Would you like to receive Teahouse news?', 
        choices=[
            (False, "No, essential emails only please"),
            (True, "Yes, send me occasional product updates"),
        ],
    )

Produces this HTML:

<select id="joinlist" name="joinlist">
    <option>No, essential emails only please</option>
    <option value="True">Yes, send me occasional product updates</option>
</select>

And if you select the "No" option (or leave it at the default), it'll say "Not a valid choice"

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