Skip to content
Permalink
Browse files

Fix for ordering with multi selects

  • Loading branch information...
David McReynolds
David McReynolds committed Sep 12, 2017
1 parent b7fa5da commit 7f743339bb8e59084fabeaefd136764c1d57d229
Showing with 5 additions and 4 deletions.
  1. +5 −4 fuel/modules/fuel/controllers/Module.php
@@ -1897,12 +1897,13 @@ function refresh_field()
// for multi select
if (is_array($values))
{
$selected = (array) $selected;
foreach($values as $v)
$selectedValues = $values;
if ( ! in_array($selected, $selectedValues))
{
if ( ! in_array($v, $selected)) $selected[] = $v;
$selectedValues[] = $selected;
}
$selected = $selectedValues;
}
if ( ! empty($selected)) $fields[$field]['value'] = $selected;

0 comments on commit 7f74333

Please sign in to comment.
You can’t perform that action at this time.