Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
remove placeholder from inline multiselects as it gets in the list as…
Browse files Browse the repository at this point in the history
… a default empty option
  • Loading branch information
tacone committed Sep 20, 2016
1 parent 8f3e33a commit 5790cfe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/DataForm/Field/Multiselect.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public function getValue()

if (is_array($this->value)) {
$this->values = $this->value;
}
else {
} else {
$this->values = explode($this->serialization_sep, $this->value);
}

Expand Down Expand Up @@ -62,6 +61,8 @@ public function build()
case "create":
case "modify":
$this->attributes['multiple'] = 'multiple';
$this->attributes['data-placeholder'] = $this->attributes['placeholder'];
$this->attributes['placeholder'] = null;
$output .= Form::select($this->name . '[]', $this->options, $this->values, $this->attributes);
$output .= $this->extra_output;
break;
Expand All @@ -72,6 +73,7 @@ public function build()

default:
}

$this->output = $output;
}
}

0 comments on commit 5790cfe

Please sign in to comment.