Project

General

Profile

Actions

Bug #87430

closed

Fields which are not required render with required attribute

Added by Jarvis H over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2019-01-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

A text field will render with the required attribute even though the "required" setting is not present in the yaml config.

How to reproduce:

Create a form with two text fields, the first set to "required" (see yaml config below).

The required field must be positioned before the non-required field, if it is not the bug does not occur.

Expected outcome:

Only the first field should be required.

Actual outcome

Both fields are set to required, where the second field also has the "required" attribute, but not the label indicator (see attached screenshot).

Suspected cause
The formvh:translateElementProperty viewhelper


renderingOptions:
  submitButtonLabel: Submit
type: Form
identifier: test
label: Test
prototypeName: standard
renderables:
  -
    renderingOptions:
      previousButtonLabel: 'Previous step'
      nextButtonLabel: 'Neue Seite'
    type: Page
    identifier: page-1
    label: Step
    renderables:
      -
        defaultValue: ''
        type: Text
        identifier: text-1
        label: 'Required field'
        validators:
          -
            identifier: NotEmpty
        properties:
          fluidAdditionalAttributes:
            required: required
      -
        defaultValue: ''
        type: Text
        identifier: text-2
        label: 'Not required field'


Files

field_required.png (137 KB) field_required.png Jarvis H, 2019-01-14 16:01

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #86890: AbstractTagBasedViewHelper recycles the TagBuilderClosed2018-11-08

Actions
Actions

Also available in: Atom PDF