Dynamically updating field with JQuery

11 views
Skip to first unread message

Jason S

unread,
May 23, 2014, 7:06:31 AM5/23/14
to django...@googlegroups.com
Hi,
I'm sure this has been discussed to death, however the examples i've seen involve 3rd party django apps or are very complicated and I haven't been able to find a clear example which.I can repurpose.
I'm new to development so am building up a Django website to help grow my skills, but have a long way to go and its tough picking up Django, Python and JQuery at once.

I would like to show a simple form based off a model, where some fields are hidden.
The form includes a category and subcategory field. There is a one to many relationship between the fields.
I would like to dynamically update the form to either:
  • Show the hidden "subcategory" field, populated with the queryset based on the selected category.
  • Just populate the subcategory field with a populated queryset based on the selected category
If someone could give a quick example on using JQuery to achieve the above it'd be very helpful.
Thanks for any help you can spare.
J

Reply all
Reply to author
Forward
0 new messages