Skip to content

Commit

Permalink
Check for null value in textarea form field layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ggppdk committed May 1, 2024
1 parent b1e26c8 commit 06c50fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/flexicontent_fields/textarea/tmpl/field_default.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
return;
}
}
if (!strlen($value ?? '') && !$use_ingroup && $n) continue; // If at least one added, skip empty if not in field group
$value = $value ?? '';
if (!strlen($value) && !$use_ingroup && $n) continue; // If at least one added, skip empty if not inside a field group

$fieldname_n = $field->field_type == 'maintext' ? $fieldname : $fieldname.'['.$n.']';
$elementid_n = $field->field_type == 'maintext' ? $elementid : $elementid.'_'.$n;
Expand Down

0 comments on commit 06c50fd

Please sign in to comment.