src/Helpers/Form.php
public function getFields()
    {
        if (empty($this->fields)) {
            $this->fields = $this->getFieldDefinitions();
            $this->fields = $this->formHelper->addMetaField($this->fields);
        }
        return $this->fields;
    }
public function getFields()
    {
        if (empty($this->fields)) {
            $this->fields = $this->getFieldDefinitions();
            $this->fields = $this->formHelper->addMetaField($this->fields);
        }
        return $this->fields;
    }
public function getFields ( ) { if ( empty ( $ this -> fields ) ) { $ this -> fields = $ this -> getFieldDefinitions ( ) ; $ this -> fields = $ this -> formHelper -> addMetaField ( $ this -> fields ) ; } return $ this -> fields ; }
Returns a definition of the form fields.

This should NOT include any:
- Submit or cancel buttons. These are often added by the webshop software
in their specific way.
- Tokens, form-id's or other (hidden) fields used by the webshop software
to protect against certain attacks or to facilitate internal form
processing.

This is a recursive, keyed array defining each form field. The key
defines the name of the form field, to be used for the name, and possibly
id, attribute. The values are a keyed array, that can have the following
keys:
- type: (required, string) fieldset, details, text, email, password,
date, textarea, select, radio, checkbox, markup.
- legend/summary: (string) human readable title for a fieldset/details.
- label: (string) human readable label, legend or summary.
- description: (string) human readable help text.
- value: (string) the value for the form field.
- attributes: (array) keyed array with other, possibly html5, attributes
to be rendered. Possible keys include e.g:
- size
- class
- required: (bool) whether the field is required.
- fields: (array) If the type = 'fieldset' or 'details', this value
defines the (possibly recursive) fields of a fieldset/details element.
- options: (array) If the type = checkbox, select or radio, this value
contains the options as a keyed array, the keys being the value to
submit if that choice is selected and the value being the label to
show.

Do NOT override this method, instead override getFieldDefinitions().

@return array[]
The definition of the form.
Returns a definition of the form fields .