Skip to content
Snippets Groups Projects
Commit 05abd96d authored by John Huxley's avatar John Huxley Committed by Phil Wolstenholme
Browse files

Issue #3162578 by JPHuxley: Notice due to missing submit button

parent 769fc75f
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,8 @@ function submit_and_continue_form_alter(&$form, $form_state, $form_id) {
}
foreach ($submit_and_continue_targets as $target_form) {
if (\Drupal::routeMatch()->getRouteName() == $target_form['route']) {
if (\Drupal::routeMatch()
->getRouteName() == $target_form['route'] && isset($form['actions']['submit']['#submit'])) {
$form['actions']['submit_and_continue'] = [
'#type' => 'submit',
'#submit' => array_merge($form['actions']['submit']['#submit'], ['submit_and_continue_submit']),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment