Skip to content

Commit

Permalink
fix #405
Browse files Browse the repository at this point in the history
  • Loading branch information
jqhph committed Aug 7, 2020
1 parent 83bb48c commit d9351ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Form.php
Expand Up @@ -683,14 +683,14 @@ public function removeIgnoredFields($input)
{
Arr::forget($input, $this->ignored);

$ignored = $this->fields()->map(function (Field $field) {
$ignored = $this->fields()->transform(function (Field $field) {
if ($field instanceof Field\Display || $field->getAttribute('readonly') || $field->getAttribute('disabled')) {
return $field->column();
}
})->filter()->toArray();
})->filter();

if ($ignored) {
Arr::forget($input, $ignored);
if (! $ignored->isEmpty()) {
Arr::forget($input, $ignored->flatten()->toArray());
}

return $input;
Expand Down

0 comments on commit d9351ff

Please sign in to comment.