$this->
operatorForm($row,
$form_state);
// Force the operator form to be a select box. Some handlers uses
// radios and they occupy a lot of space in a table row.
$row['operator'
]['#type'
] = 'select';
$row['operator'
]['#title'
] = '';
$this->
valueForm($row,
$form_state);
// Fix the dependencies to update value forms when operators changes. This
// is needed because forms are inside a new form and their IDs changes.
// Dependencies are used when operator changes from to 'Between',
// 'Not Between', etc, and two or more widgets are displayed.
FormHelper::
rewriteStatesSelector($row['value'
], ':input[name="options[operator]"]', ':input[name="options[group_info][group_items][' .
$item_id . '][operator]"]'
);
// Set default values.
$children = Element::
children($row['value'
]);
if (!
empty($children)) { foreach ($children as $child) { if (!
empty($row['value'
][$child]['#states'
]['visible'
])) { foreach ($row['value'
][$child]['#states'
]['visible'
] as $state) { if (isset($state[':input[name="options[group_info][group_items][' .
$item_id . '][operator]"]'
])) { $row['value'
][$child]['#title'
] = '';
// Exit this loop and process the next child element.