mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-25 19:46:13 +00:00
set required to false refs #301
This commit is contained in:
parent
dcae01d860
commit
37375ec357
@ -80,7 +80,7 @@ class CustomFieldChoice implements CustomFieldInterface
|
|||||||
$options = array(
|
$options = array(
|
||||||
'multiple' => $customField->getOptions()[self::MULTIPLE],
|
'multiple' => $customField->getOptions()[self::MULTIPLE],
|
||||||
'choices' => $choices,
|
'choices' => $choices,
|
||||||
'required' => (count($choices) > 1) ? true : false //not required if only one
|
'required' => false
|
||||||
);
|
);
|
||||||
|
|
||||||
//if allow_other = true
|
//if allow_other = true
|
||||||
|
@ -50,7 +50,8 @@ class CustomFieldText implements CustomFieldInterface
|
|||||||
: 'textarea';
|
: 'textarea';
|
||||||
|
|
||||||
$builder->add($customField->getSlug(), $type, array(
|
$builder->add($customField->getSlug(), $type, array(
|
||||||
'label' => $customField->getName()[$this->requestStack->getCurrentRequest()->getLocale()]
|
'label' => $customField->getName()[$this->requestStack->getCurrentRequest()->getLocale()],
|
||||||
|
'required' => false
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user