Closed patrickmj closed 7 years ago
This may be a result of an annoying quirk of $form->getInputFilter()
which attaches input filter defaults only on its first call. Default input filters of any elements added later aren't loaded at all.
That makes a lot of sense with the different results I've been getting. Would it be worth making an Omeka\Form\Form
that extends Zend\Form\Form
to avoid that quirk? Maybe add an addInputFilter()
method, and adjust getInputFilter()
to use those when it's called in prepare()
?
Pretty sure this is resolved because of the separate "elements" and "input filters" events.
The ways to make a field required seem to be causing conflicts when it uses inputFilter.
To reproduce, with both modules installed on latest master and core on global-settings-event branch, watch these lines around Sharing\Module.php ll 115 to 125:
It's almost certain that this is related to the quirky results from the global settings callback. Look to the different callbacks, and comment in and out to confirm