I am attempting to obtain a value which is present in a form that is passed to my template. This is what my view does
return render(request, 'manageStudent.html',
{'form': StudentDetails(
initial={
'school_name': rslt[0][1],
'student_user_name': rslt[0][3],
}
),}
I am attempting to read the username using the following way in my template
This is the data {{ form.fields.student_user_name.initial}}
However i simply get None in response. I tried the suggestions here but none seem to work in my case. Any suggestions ?