See https://www.woltlab.com/community/thread/291431-mindestalter-geburtsdatum-ist-pflichtfeld-wird-aber-nicht-so-deklariert/
{
$this->data['visible'] = $visibleOption;
}
+
+ public function setRequired(bool $isRequired): void
+ {
+ $this->data['required'] = $isRequired ? 1 : 0;
+ }
}
*/
public $conditionMode = false;
+ public function init()
+ {
+ parent::init();
+
+ if ($this->inRegistration && REGISTER_MIN_USER_AGE) {
+ foreach ($this->options as $option) {
+ if ($option->optionName === 'birthday') {
+ $option->setRequired(true);
+ }
+ }
+ }
+ }
+
/**
* Shows empty options.
*