-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentimprovement
Description
The values for textarea admin form elements are added after calling the parent constructor.
This means that if I add an element in the admin form and specify the cols or rows they will be ignored.
$fieldset->addField('some_name', 'textarea', array(
'name' => 'some_name',
'label' => __('Some Label'),
'title' => __('Some Label'),
'rows' => 10,
'cols' => 40
));
I end up with
<textarea data-ui-id="....-fieldset-element-textarea-some-name" class=" textarea" cols="15" rows="2" title="Some Label" name="some_name" id="some_name"></textarea>
In order to change the cols and rows I need to get the element from the fieldset and set the cols and rows.
I think the setters in the constructor should be wrapped in an if statement. This should solve the issue.
if (!$this->getRows()) {
$this->setRows(2);
}
if (!$this->getCols()) {
$this->setCols(15);
}
Metadata
Metadata
Assignees
Labels
Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentimprovement