When I use hook_form_alter() to add an additional submit handler to the config form for this module, the values of the form are not being saved. For example, when I choose "Sample Minter" and save the form:
the option is not saved:
The other form values are not saved either.
I have confirmed that the issue is caused by the custom submit function in the Sample Minter module. When I comment out $form['actions']['submit']['#submit'][] = 'sample_minter_submit'; in the _form_alter() implementation, the form saves as expected.
My goal here is to have only one admin settings form, but to allow any minter and persister module to alter that form to provide their own settings.
Resolved. Inside the hook_form_alter(), I needed to use $form['#submit'][] = 'sample_minter_submit';, not $form['actions']['submit']['#submit'][] = 'sample_minter_submit';.
When I use
hook_form_alter()
to add an additional submit handler to the config form for this module, the values of the form are not being saved. For example, when I choose "Sample Minter" and save the form:the option is not saved:
The other form values are not saved either.
I have confirmed that the issue is caused by the custom submit function in the Sample Minter module. When I comment out
$form['actions']['submit']['#submit'][] = 'sample_minter_submit';
in the _form_alter() implementation, the form saves as expected.My goal here is to have only one admin settings form, but to allow any minter and persister module to alter that form to provide their own settings.