diff --git a/CustomFields/CustomFieldChoice.php b/CustomFields/CustomFieldChoice.php index 4e78a1542..b6c7eba8b 100644 --- a/CustomFields/CustomFieldChoice.php +++ b/CustomFields/CustomFieldChoice.php @@ -80,7 +80,7 @@ class CustomFieldChoice implements CustomFieldInterface $options = array( 'multiple' => $customField->getOptions()[self::MULTIPLE], 'choices' => $choices, - 'required' => (count($choices) > 1) ? true : false //not required if only one + 'required' => false ); //if allow_other = true diff --git a/CustomFields/CustomFieldText.php b/CustomFields/CustomFieldText.php index 11c029ccb..966c1c194 100644 --- a/CustomFields/CustomFieldText.php +++ b/CustomFields/CustomFieldText.php @@ -50,7 +50,8 @@ class CustomFieldText implements CustomFieldInterface : 'textarea'; $builder->add($customField->getSlug(), $type, array( - 'label' => $customField->getName()[$this->requestStack->getCurrentRequest()->getLocale()] + 'label' => $customField->getName()[$this->requestStack->getCurrentRequest()->getLocale()], + 'required' => false )); }