{% import "_includes/forms" as forms %} {% set fieldNamespace = 'fields'~random() %}
{{ csrfInput() }} {% if section.type != 'single' and entryType.hasTitleField %} {{ forms.textField({ label: entryType.titleLabel|t('app'), id: 'title', name: 'title', required: true, first: true }) }} {% endif %} {% namespace fieldNamespace %} {% for field in entryType.getFieldLayout().getFields() %} {% if field.required or field.id in widget.fields %} {% include "_includes/field" with { field: field, required: field.required, entry: null } only %} {% endif %} {% endfor %} {% endnamespace %}