Skip to content

Commit

Permalink
fix(actorfield): avoid empty choice
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jan 31, 2022
1 parent 962bb33 commit 5743b78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/field/actorfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,14 @@ public function getRenderedHtml($domain, $canEdit = true): string {
$fieldName = 'formcreator_field_' . $id;
$domId = $fieldName . '_' . $rand;

// Value needs to be non empty to allow execition of select2's initSelection
// Value needs to be non empty to allow execution of select2's initSelection
$params = [
'specific_tags' => [
'multiple' => 'multiple',
],
'entity_restrict' => -1,
'itemtype' => User::getType(),
'display_emptychoice' => false,
'values' => array_keys($value),
'valuesnames' => array_values($value),
'_idor_token' => Session::getNewIDORToken(User::getType()),
Expand Down

0 comments on commit 5743b78

Please sign in to comment.