Readonly field and disbled field never send on form post.
You should workaround this, for example, with a css class.
.disabledfield{
pointer-events: none;
opacity: 0.4;
}
or enabling with js on send click.
Regards.
El mié., 23 sept. 2020 a las 13:20, coolguy (<[email protected]>)
escribió:
> please share the views.py and template i.e. xxx.html. i'ts not possible
> to tell what's wrong with the provided information....
>
> On Wednesday, September 23, 2020 at 11:43:36 AM UTC-4
> [email protected] wrote:
>
>> Hello i have this problem :
>> MultiValueDictKeyError at
>> The view is:
>> matricola = request.POST['matricola']
>>
>> The form is:
>>
>> matricola = forms.CharField(label='Matricola', required = False,
>> max_length=100, widget = forms.TextInput(attrs={'readonly':'readonly'}))
>>
>> the template is
>>
>> {{ form }}
>>
>> Why i get this error?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9287bb2a-84a2-42ba-87a7-40344f75ecdcn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/9287bb2a-84a2-42ba-87a7-40344f75ecdcn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAHRQUHkXpM5QO63S%3DG587UiJ0pmtoR%2BbuXH0BUs5OqYL%3DVm36w%40mail.gmail.com.