Skip to content

disabled field fills wrong initial value #64

@fboerman

Description

@fboerman

Hi, I have an enumfield that I have disabled as part of a form with disabled=True. however then the validation always validates the field as being wrong.

After some debugging I found this is due to the fact that the value given to clean differs if the field is disabled or not. when it is not disabled it is a string containing a number if it is disabled it is a string containing the string name of the enum option.

I have spend quite some time thinking about a solution myself but cant get it right. Does any of the maintainers have an idea? Thanks in advance!

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