ForeignKey as dropdown list, get user's choice
Hello!
I have a form including a field: veh_id1 = models.ForeignKey(Vehicles)) that is being rendered on the template as dropdown list.
Now I want according to the user's choice in that list some other fields of my form to be auto-completed and displayed on the template before the form submission.
I guess that I should use ajax for that. But I really don't know how I will access that user's choice in veh_id1 since it's not rendered as a classic html select and I don't have id for each choice etc. Sry if my question is dump but I'm new to all that and now I'm stuck.
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/F6XpJXQ70UoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home