Closed zeleznypa closed 2 months ago
I tried to reproduce it https://gist.github.com/jtojnar/0c059c4b1671a9c7348d641a2578445d but get no error.
What do you mean you want more than one multiplier? Your example contains only a single one. Could you please create a minimal reproducible example (e.g. something like the gist above)?
Issue was caused by the fact that I still create forms "the old-fashioned way", i.e. I pass the parent to the constructor and then I define the content of the form (i.e. I create the definition of the multiplier including the addCreateButton
call).
Since the multiplier is hooked to the Form::onRender
event, the order of the call is crucial in this regard.
Thus the advice: If this error occurs, you need to move addCreateButton
before parent::__construct($parent, $name);
When I need to add more than one multiplier into the form, I need to have them with different names:
But it fails on the error
Component with name 'multiplier_creator' does not exist