Please help me obtain the value from a dropdown list correctly. I am using the Django-widget-tweaks library.
Here is the code for the dropdown list field from which I want to retrieve the string value:
<p >{{ form.category_column.label_tag }}</p>
<p id="category_column_id">{% render_field form.category_column autocomplete="off" hx-get="/sizescolumn/" hx-target="#id_sizes_column" %}</p>
I have attempted to extract the value using JavaScript with this line of code:
var select = document.getElementById('category_column_id').value;
Note: I need the string value from this dropdown list field to compare it with another string value.
--->Unfortunately, so far it has not been successful. Thank you in advance.