Skip to content

Commit

Permalink
fix multiple choice on export + fix insert database
Browse files Browse the repository at this point in the history
  • Loading branch information
Devolicious committed Jul 17, 2014
1 parent 59fc57f commit beb3260
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function __toString()
if (is_array($values) && sizeof($values) > 0) {
$result = array();
foreach ($values as $value) {
$result[] = array_key_exists($value, $choices) ? $choices[$value] : $value;
$result[] = array_key_exists($value, $choices) ? trim($choices[$value]) : $value;
}
return implode(", ", $result);
} else {
Expand Down
1 change: 1 addition & 0 deletions Entity/PageParts/ChoicePagePart.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public function getDefaultView()
public function adaptForm(FormBuilderInterface $formBuilder, ArrayObject $fields)
{
$choices = explode("\n", $this->getChoices());
$choices = array_map('trim', $choices);

$cfsf = new ChoiceFormSubmissionField();
$cfsf->setFieldName("field_" . $this->getUniqueId());
Expand Down

0 comments on commit beb3260

Please sign in to comment.