Added required grouping to the condition for the selected opitional fields in the helperlist

This commit is contained in:
vishalsingh.qlo325
2024-07-02 13:22:08 +05:30
parent 845e5ef23c
commit 39b60fa6c2

View File

@@ -733,8 +733,8 @@ class HelperListCore extends Helper
}
if (isset($field['optional']) && $field['optional']) {
$this->fields_optional[$key] = $field;
if (((!is_array($list_visibility) && isset($field['visible_default']) && $field['visible_default'])
|| $list_visibility && in_array($key , $list_visibility))
if ((!is_array($list_visibility) && isset($field['visible_default']) && $field['visible_default'])
|| ($list_visibility && in_array($key , $list_visibility))
) {
$this->fields_optional[$key]['selected'] = true;
}