Thursday, October 19, 2017

dynamic choices based on another field input.

hi have a form which have two fields. one field has a foreignkey from model A(in image) base field. and another field is a drop down box where the choices should be dynamic based on first field selection. the choices should all the values of field Os from second model B associated with the Base key value i have given in first field. 
example from image. 
field 1= 10
field 2= (A,C) as these two values are associted with 10 in model B.

can someone help me here.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5ff8c070-325a-4cf7-abe1-6fb59f985b40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment