Task #37558

Form.Textfield ViewHelper's placeholder attribute should be (re)moved

Added by Adrian Föder about 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2012-05-29
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:ViewHelpers
Target version:TYPO3 Flow Base Distribution - 2.1
Has patch:No

Description

currently, the placeholder attribute in the Textfield ViewHelper is explicitly enabled:

code class="php">
    public function render($required = NULL, $type = 'text', $placeholder = NULL) {
        // [...]
        if ($placeholder !== NULL) {
            $this->tag->addAttribute('placeholder', $placeholder);
        }

For consistency, this part should either be completely removed and settable via additionalArguments or, alternatively, set as registerTagAttribute() in initializeArguments(). Of course we need to handle deprecation accordingly.

If you neither agree, than this should at least be reproduced in the textarea ViewHelper.


Related issues

related to TYPO3.Fluid - Feature #37496: placeholder attribute in textarea-viewhelper Closed 2012-05-25
related to TYPO3.Fluid - Feature #55723: Support of schema.org attributes Closed 2014-02-06
duplicated by TYPO3.Fluid - Bug #48121: TextareaViewHelper is missing valid html5 argument placeh... Resolved 2013-05-12

Associated revisions

Revision 11ecf9b2
Added by Karsten Dambekalns over 2 years ago

[!!!][TASK] Clean up placeholder on textfield and text area VHs

The form.textfield VH had a placeholder attribute as argument to the
render() method; the form.textarea VH did not support placeholder at all.

With this change the placeholder is available on both VHs but registered
as tag attribute.

If you extended TextfieldViewHelper::render() make sure to remove the
$placeholder argument, otherwise you will see

Argument "placeholder" has already been defined, thus it should not
be defined again.

errors from Fluid.

Change-Id: I24bb73c5de5a494259171ff289d434892f85e16e
Resolves: #37558
Releases: master

Revision c8089da1
Added by Adrian Föder over 2 years ago

[TASK] Add placeholder attribute to password ViewHelper

As a follow-up to I24bb73c5de5a494259171ff289d434892f85e16e,
this also adds the placeholder attribute to the password
ViewHelper.

Change-Id: Ib442a6b1a52f9ddc38a9227311559d8803443eee
Related: #37558
Releases: master, 2.0

Revision f40be1d7
Added by Adrian Föder over 2 years ago

[TASK] Add placeholder attribute to password ViewHelper

As a follow-up to I24bb73c5de5a494259171ff289d434892f85e16e,
this also adds the placeholder attribute to the password
ViewHelper.

Change-Id: Ib442a6b1a52f9ddc38a9227311559d8803443eee
Related: #37558
Releases: master, 2.0

History

#1 Updated by Karsten Dambekalns over 2 years ago

  • Target version changed from 2.0 beta 1 to 2.0

#2 Updated by Karsten Dambekalns over 2 years ago

  • Status changed from New to Accepted
  • Assigned To set to Karsten Dambekalns

#3 Updated by Gerrit Code Review over 2 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17684

#4 Updated by Karsten Dambekalns over 2 years ago

  • Target version changed from 2.0 to 2.1

#5 Updated by Karsten Dambekalns over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF