I tried to override value of 'input' in view code like this.
$field->input = '<my input code>';
but the result in html was not changed. (same as before overridden)
The input code is changed to new value.
The code is not changed. And this line is shown in log file.
2019-08-16T12:36:56+00:00
INFO ::1 - Cannot access protected / private property input of Joomla\CMS\Form\FormField
Joomla 3.9.8
Labels |
Added:
?
|
Labels |
Added:
J3 Issue
|
Status | New | ⇒ | Information Required |
Thankyou @franz-wohlkoenig. I will update Joomla to the latest version.
Another update, I try to look inside the method '__set' of FormField class (parent class of JFormFieldText). The 'input' property does not appear in switch case. So it means that the input property should not be set directly?
i'm no dev, but sure a dev. will answer :-)
It's not intended to set the input directly because most of the formfields building the input on the fly using the getInput method and render a layout.
Title |
|
Thankyou @HLeithner, I override the attribute of input html element via the other property of JFormFieldText such as $field->class
and call renderField method. It works. The input html element is changed as my expectation.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-08-20 19:09:09 |
Closed_By | ⇒ | chinphing5 |
can you please update on latest version?