How to fill a form field based on the value of an autocomplete field in Django template using Ajax+jQuery
问题 In my application, I am using Ajax+jQuery to populate the unit of measure field based on a product selected by the user using a dropdown. In my products model, each product has been assigned a unit of measure and is picked up to autofill the unit field during order creation. I am using jQuery to pick up the product from select field and capturing the event using .on('change') event. Following are the objects: models.py Model : Product class Product(models.Model): product_id = models