views:

70

answers:

1

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 }}?

+4  A: 

You can get the ID like this:

{{ field.auto_id }}
Will Hardy