Get a field's required attribute in frontend form I am trying to get the required attribute of a field in a frontend form. I know this attribute only makes sense in the context of an entry type. Doing this

craft.fields.getFieldByHandle('handle')

returns a FieldModel object which has no context to any entry type. This way I can get the field name and the instructions for example. In Craft we set the required attribute in the entry type editor. So my question is:

How can I get a field's required attribute in the context of a specific entry type?

Edit: My goal is to create a frontend form of an entry type and have every change to the field's required flags in the backend automatically reflected in the frontend form: &lt;input required ...&gt;.
I could not find a way to get a specific field for a model but you can get all and loop through them

&lt;!-- fetch all fields for your entryType --&gt;
{% for field in craft.entries.section('yourSection').type('yourEntryType').first.getFieldLayout().getFields() %}
    &lt;!-- loop them and check the handle if it is your field --&gt;
    {% if field.getField().handle == "yourFieldHandle" %}
        &lt;!-- the required attribute --&gt;
        {% set required = field.required %}
        {{ field.getField().name }}
        {{ field.getField().instructions }}
    {% endif %}
{% endfor %}


Edit: if you really want to have only one field instead of the array I could create php code for you but since many people refuse to use php in craft I presented the "slower" twig method

Edit: There is a required property in both the FieldLayoutFieldModel (stored above in field) and in the FieldModel (field.getField() above). What we want as the required flag of the entry type is the first: field.required. This is what appears to be the little red asterisk in Craft's backend.