title: How can I add javascript file to my ModelForm in django?
body: <p>I want to display a separate div tags based on the selection of dropdown, I am using ModelForm to create my template. I am not sure how to add a javascript in my ModelForm.</p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class CustomerForm(forms.ModelForm):
      name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Customer Name '}))
      address = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Customer Address'}))
      phone_number = forms.IntegerField(widget=forms.TextInput(attrs={'placeholder': 'Customer Phone Number '}))
      email = forms.EmailField(widget=forms.TextInput(attrs={'placeholder': 'Customer Email'}))
      contact_person = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Contact person'}))
      # amc = forms.BooleanField(widget=forms.TextInput(attrs={'placeholder': 'type "amc" if the customer is in AMC'}))
      amc_date = forms.DateField(widget=forms.TextInput(attrs={'placeholder': 'ex: Jan 20, 1996','id':'disabledInput'}))
      amc_product = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Products listed in AMC'}))
      # warranty = forms.BooleanField(widget=forms.TextInput(attrs={'placeholder': 'Type "warranty" if the customer is in Warranty'}))
      warranty_date = forms.DateField(widget=forms.TextInput(attrs={'placeholder': 'ex: Jan 20, 1996'}))
      warranty_product_list = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Products listed in warranty'}))
      # on_call = forms.BooleanField(widget=forms.TextInput(attrs={'placeholder': 'Type "oncall/on call" if it is On Call'}))
      # support = forms.CharField(widget=forms.TextInput(attrs={'placeholder':'Enter: amc/warranty/oncall'}))
      support = forms.ChoiceField(choices=support_choice, required=True, widget = forms.Select(attrs={'onchange' : 'customer()'}))
  
  class Meta:
      model = Customer
      fields = ['name','address','phone_number','email','contact_person','support','amc_date','amc_product','warranty_date',
                'warranty_product_list']
  </code></pre>
  
  <p>I want to display the 'amc_date' &amp; 'amc_product' when amc is selected from the options of 'support' and 'warranty_date' &amp; 'warranty_product_list' when 'warranty' is selected from the options of 'support'.</p>
  
  <p><strong>customer_detail.html</strong></p>
  
  <pre><code>&lt;script type="text/javascript" src="{% static 'js/customer_detail.js' %}"&gt;&lt;/script&gt;
  
  &lt;form method="post" action="" enctype="multipart/form-data"&gt;
     {% csrf_token %}
     {{ form|crispy }}
     &lt;input type="submit" class="btn btn-default " value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am not sure how to use Javascript in my ModelForm, please help.</p>