Skip to content

Commit

Permalink
Update render.php
Browse files Browse the repository at this point in the history
Add showon test for custom fields that are meant to be sent through email.
  • Loading branch information
obuisard committed Sep 11, 2023
1 parent 9d19185 commit 095cb66
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/com_contact/layouts/fields/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
continue;
}

// Check conditions on fields
$showOn = $field->params->get('showon', '');
if (!empty($showOn) && !SYW\TmpFields\Fields::matchShowon($showOn, $fields)) {
continue;
}

$layout = $field->params->get('layout', 'render');
echo FieldsHelper::render($context, 'field.' . $layout, ['field' => $field]);
}

0 comments on commit 095cb66

Please sign in to comment.