{% extends "standard-form.njk" %}

{% from "govuk/components/input/macro.njk" import govukInput %}

{% set errorMap = {
        'habitat-name': {
          'string.empty': { ref: '#habitat-name', text: 'Enter a sett name' }
        }
    }
%}

{% set title = 'What is this sett called?' %}

{% block pageContent %}

  <p class="govuk-body">Enter a name for the sett to identify and distinguish it from other setts. You should use the name it has on your maps or within your method statement. You can enter up to 100 characters.</p>

  {{ govukInput({
    id: "habitat-name",
    name: "habitat-name",
    errorMessage: { text: 'Enter a name for this sett.' } if error['habitat-name'],
    attributes: { maxlength: 100 },
    value: data.name,
    hint: {
      text: 'Enter a sett name'
    }
  }) }}

{% endblock %}
