I am unable to catch the values from the unit_id after the selection is done by the user and data is posted. Can someone help me to solve this.
unit_id
The values o
Before you call form.is_valid(), do the following:
form.is_valid()
unit_id = request.POST.get('unit_id')
form.fields['unit_id'].choices = [(unit_id, unit_id)]
Now you can call form.is_valid() and your form will validate correctly.