Skip to content

Commit

Permalink
Fix search mode rendering for select fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dasistwas committed May 25, 2024
1 parent 9ff8a32 commit 5d206a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions filter/filter_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ public function custom_search_definition($customsearch, $fields, $fieldoptions,
$operatoroptions);
$mform->setDefault('searchoperator' . $count, $operator);
// Field search elements.
// For select options $value is an arry, we have to convert it to string, function param only accepts strings.
if (is_array($value)) {
$value = json_encode($value);
}
list($elems, $separators) = $fields[$fieldid]->renderer()->render_search_mode(
$mform, $count, $value);

Expand Down

0 comments on commit 5d206a0

Please sign in to comment.