Is there any way to get the id of a field in a template?
In the HTML I get: <input name="field_name" id="id_field_name"...
I know I can get the name with {{ field.html_name }}
, but is there anything similar for getting the id?
Or can I only get it like this: id_{{ field.html_name }}
?
You can get the ID like this:
{{ field.auto_id }}