We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc6f127 commit 472d6a5Copy full SHA for 472d6a5
1 file changed
view/adminhtml/templates/form/field.phtml
@@ -29,8 +29,18 @@ if (false === $field instanceof Field) {
29
$fieldViewModel = $viewModelFactory->create(FieldViewModel::class);
30
$field = $fieldViewModel->getField($block);
31
}
32
+
33
+if (false === $field->isVisible()) {
34
+ return;
35
+}
36
37
+$depends = $field->getDepends();
38
+$dependStatement = '';
39
+if (!empty($depends)) {
40
+ $dependStatement = 'x-show="item.'.$depends['propertyName'] . " == '".$depends['propertyValue']."'\"";
41
42
?>
-<div class="admin__field">
43
+<div class="admin__field" <?= $dependStatement ?>>
44
<div class="admin__field-label">
45
<label for="<?= $escaper->escapeHtml($field->getCode()) ?>">
46
<span><?= $escaper->escapeHtml($field->getLabel()) ?></span>
0 commit comments