User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Allow to get the default value of a form field. In some cases if you want to compare the current value to the default value and see if they are different.
Create a filter_xxx.xml and add a filter with a default value.
In a list view add code:
$this->filterForm = $model->getFilterForm();
$filters = $this->filterForm->getGroup('filter');
foreach ($filters as $fieldName => $field) {
$field->class .= $field->value != $field->default ? ' active' : '';
}
The class active is not added to the field.
The class active is added to the file.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-07-17 08:14:33 |
Closed_By | ⇒ | Flowman | |
Labels |
Added:
Feature
PR-5.3-dev
|
The filter is getting the default at
joomla-cms/libraries/src/Form/Form.php
Line 1058 in ffe1acf
But maybe a "getter" for this will not hurt.
Please rebase the PR to 6.0, as new feature. And add an info how to test it, current info is not clear.