No.1- I cannot make the enable and disable to work when I call back the particular patient. It will be shown all enable.
No.2- When I wanted to save the form, all the disable column is not save.
Here is some of my coding.
views.py
def clean(self):# not sure if this is needed
cleaned_data = super(RehabDiabetesForm, self).clean()
ANSVAR_SEKTOR = cleaned_data.get("ANSVAR_SEKTOR")
if ANSVAR_SEKTOR == "2":
''
if "2" not in ANSVAR_SEKTOR:
raise forms.Validationerror ("Try again")
return cleaned_data
def form_valid(self, form):
if (form.cleaned_data['ANSVAR_SEKTOR'] == "2"):# i try this but i am stuck and don't know how to proceed
''
form.save()
return HttpResponseRedirect(reverse("afdelingt_view"))
Herewith i attached how the page look like. Maybe it will give a better understanding. If its not clear please write to me. Will explained the very best. Thanks a million

New Topic/Question
Reply



MultiQuote


|