{% from "_includes/forms" import textField %}
{% set static = static is defined ? static : false %}
{% set entryType = entry.getType() %}

{{ textField({
    label: entryType.titleLabel|t('site')|e ?: 'Title'|t('app'),
    siteId: entryType.hasTitleField ? entry.siteId,
    id: 'title',
    name: 'title',
    value: entry.title,
    errors: (not static ? entry.getErrors('title')),
    first: true,
    autofocus: true,
    required: not static and entryType.hasTitleField,
    disabled: static or not entryType.hasTitleField,
    maxlength: 255
}) }}
