Re: Form theory - locking a field

2020-06-24 Thread Clive Bruton
On 24 Jun 2020, at 23:03, Chetan Ganji wrote: Try this one https://docs.djangoproject.com/en/3.0/ref/forms/fields/#disabled Ok, well that's a little help, because I can disable the input: status = forms.ChoiceField(choices=Profile.status_choices, widget=forms.RadioSelect(attrs={'disab

Re: Form theory - locking a field

2020-06-24 Thread Chetan Ganji
Try this one https://docs.djangoproject.com/en/3.0/ref/forms/fields/#disabled On Wed, Jun 24, 2020, 8:06 PM Clive Bruton wrote: > I have a form in which, after filing, I would like one field to be > locked for editing, the forms.py looks like this: > > ** > > class ProfileForm(forms.

Form theory - locking a field

2020-06-24 Thread Clive Bruton
I have a form in which, after filing, I would like one field to be locked for editing, the forms.py looks like this: ** class ProfileForm(forms.ModelForm): status = forms.ChoiceField(choices=Profile.status_choices, widget=forms.RadioSelect) class Meta: model = P