Skip to content

Commit

Permalink
latest method to make it all work
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed Apr 11, 2024
1 parent 31f17d4 commit 323be4b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions modules/backend/widgets/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public function setFormValues($data = null)
public function onRefresh()
{
$result = [];
$saveData = $this->getSaveData(false);
$saveData = $this->getSaveData(true);

/**
* @event backend.form.beforeRefresh
Expand Down Expand Up @@ -1174,12 +1174,10 @@ protected function showFieldLabels($field)
*
* @return array
*/
public function getSaveData($applyFilters=true)
public function getSaveData($allFields=false)
{
$this->defineFormFields();
if ($applyFilters) {
$this->applyFiltersFromModel();
}
$this->applyFiltersFromModel();

$result = [];

Expand All @@ -1198,7 +1196,7 @@ public function getSaveData($applyFilters=true)
/*
* Disabled and hidden should be omitted from data set
*/
if ($field->disabled || $field->hidden) {
if (!$allFields && ($field->disabled || $field->hidden)) {
continue;
}

Expand Down

0 comments on commit 323be4b

Please sign in to comment.