1👍
Your form is submitting desc_1
, so there’s a an input with name="desc_1"
that has a populated value of Type bestand somewhere in your template. blank=True
means the value can be left empty. Since your field has choices
and blank=True
, the submitted value can be either empty or one of the FILE_TYPE_CHOICES
.
You’re saying that Type bestand is the placeholder for this field, but if you rendered this field as a hidden input ({{ form.desc_1 }}
since you have a widget overridden) it would not and should not have a placeholder.
A regular form equivalent would be:
<input type="hidden" name="desc_1" value="">
Where the value attribute is either left empty or populated with one of the existing options, nothing else.
I will also add that if you’re displaying desc_1
field as a <select>
element, the placeholder option’s value
also has to be empty.
Edit
You have an option
element that is selected by default. Add the disabled
attribute to stop the form from submitting the placeholder text as a value for desc_1
:
<option value="" selected disabled>Type bestand</option>