How to access spacer in a blueprint?

I’m trying to access a spacer text in a blueprint, but no success so far. Here’s my .md file:

forms:
    contact_form:
        name: contact
        template: form-messages
        action: /home
        classes: contact__form__wrapper js-form-contact contact_form-validation-js
        fields:

            columns:
                type: columns

                fields:

                        column1:
                            type: column
                            fields:

                                - name: name
                                  placeholder: Name
                                  type: text
                                  novalidate: true
                                  classes: contact__form__input
                                - name: email
                                  placeholder: Email
                                  type: email
                                  novalidate: true
                                  classes: contact__form__input

                        column2:
                            type: column
                            fields:

                                - name: message
                                  placeholder: Message
                                  type: textarea
                                  size: long
                                  novalidate: true
                                  classes: contact__form__input--lg


                text:
                   type: spacer
                   text: All the fields are required

This blueprint is not working:

title: Contact
extends@: default

form:
  fields:
    tabs:
      type: tabs
      active: 1

      fields:
        gallery:
          type: tab
          title: Contact Fields

          fields:
            header.header:
              type: text
              label: Header 1
              validate:
                required: true
                header.forms.contact_form.text:
                  type: text
                  label: Info
                  validate:
                    required: true

Any ideas what I could do differently?

I’ve found information about the advanced blueprint features, but it doesn’t seem to work for me. Am I using it in a correct way?

title: Contact
extends@: default

form:
  fields:
    tabs:
      type: tabs
      active: 1

      fields:
        gallery:
          type: tab
          title: Contact Fields

          fields:
            header.header:
              type: text
              label: Header 1
              validate:
                required: true
            public function getFormFieldTypes()
            {
        return [
            'spacer' => [
                'input@' => true
            ]
        ];
    }

Here’s an example:

title: Group
form:
    validation: loose

    fields:
        spacer:
            type: spacer
            text: '<br>'

        groupname:
            type: text
            size: large
            label: PLUGIN_ADMIN.NAME
            disabled: true
            readonly: true
...
1 Like

I’ve been trying out grav for a while and asking quite a few questions here - most of issues have been addressed. Thanks for providing such a reliable support.