Prevent django from replacing quote marks with html

I have a django form like which displays a number of radiobuttons and I need to submit a request on click. The needs to be submited on click, but since there is a second jQuery widget, I’m trying to extract its current value on submit to package along with the request. When trying to extract the value from the additional widget django replaces quote marks in attrs with html characters which prevents it from working. I have tried enclosing the form and additional widget in {% autoescape off %} tags, as well as rendering the form manually and using safe i.e. {{ field|safe }}. However django continues to automatically replace quotes. How can I stop this from happening?

class ChloroplethIonSelectForm(forms.Form):
    choices = [ (str(i)+'_'+str(j),'mz ='+ str(i)+ 'rt = '+str(j)) for i, j in
        Data.objects.all().distinct('mz').values_list('mz',"rt_min"
        )]
    ion = forms.CharField(label = "Select an ion and a date", widget=forms.RadioSelect(
        choices = choices,attrs={'onclick': "$('#id_date') = $('#amount').val(); this.form.submit();"}
    ))
    date = forms.CharField(max_length=10, widget = forms.HiddenInput())
    formtype = forms.CharField(initial = 'chloroplethion', widget=forms.HiddenInput())

                           <form action="" method="post">
                                {% autoescape off %}
                                {% csrf_token %}
                                <p>
                                    <label for="amount">Date range:</label>
                                    <input type="text" id="amount" style="border: 0; color: #f6931f; font-weight: bold;" size="10" />
                                </p>
                                {% block choropleth_sliders %}

                                {% endblock choropleth_sliders %}
                                
                                <div id="slider_choropleth"></div>
                                <form method="post" novalidate>
                                    {% csrf_token %}
                                  
                                    {{ form_chloropleth.non_field_errors }}
                                  
                                    {% for hidden_field in form_chloropleth.hidden_fields %}
                                      {{ hidden_field.errors }}
                                      {{ hidden_field }}
                                    {% endfor %}
                                  
                                    <ul>
                                      {% for field in form_chloropleth.visible_fields %}
                                        <li>
                                          <p>{{ field.label_tag|safe }}</p>
                                          <p>
                                            {{ field.errors|safe}}
                                            {{ field|safe }}
                                            {{ field.help_text|safe }}
                                        </p>
                                      {% endfor %}

                                    </ul>
                                    
                                    <button type="submit">Submit</button>
                                  </form>
                                {% endautoescape %}