Skip to content

Adminhtml textarea field doesn't accept maxlength #21779

Closed
@rafaelstz

Description

@rafaelstz

Preconditions (*)

When I use textarea field type I can't use the attribute maxlenght, but when I use text I can use it.

File: app/code/MyCompany/MyModule/Block/Adminhtml/Manage/Edit/Form.php

Steps to reproduce (*)

Textarea

Actual result (*)

$fieldset->addField(
    'notes',
    'textarea',
    [
        'label' => __('Notes'),
        'name' => 'notes',
        'maxlength' => '70'
    ]
);
### Expected result (*)

Screenshot 2019-03-15 15 53 21

Text

$fieldset->addField(
    'notes',
    'text',
    [
        'label' => __('Notes'),
        'name' => 'notes',
        'maxlength' => '70'
    ]
);

Screenshot 2019-03-15 15 52 31

Metadata

Metadata

Assignees

Labels

Component: AdminFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions