Closed ne0-cz closed 1 year ago
Hi, did you try https://github.com/contributte/forms-multiplier/blob/master/src/Buttons/CreateButton.php#L35-L40 and https://github.com/contributte/forms-multiplier/blob/master/src/Buttons/RemoveButton.php#L28-L33 in https://github.com/contributte/forms-multiplier/blob/master/src/Multiplier.php#L169-L177 ?
@MartkCz Aha, that's it, thanks!
For future reference:
$multiplier->addRemoveButton('Remove')
->addOnCreateCallback(function($button) {
$button->getControlPrototype()
->setName('button')
->setType('submit')
->setText($button->getCaption());
});
Hi, I can't seem to be able to access neither CreateButton's or RemoveButton's SubmitButton. All my submit buttons are actually
<button>
s instead of<input>
s which is easily done for Form submit by extendingNette\Application\UI\Form
:I'd love to do the same for the multiplier buttons. It is actually useful to use real
<button>
s in some cases - I add icons to my icons via CSS this way (<input>
s don't do CSS::before
/::after
pseudo-elements). Thanks!