Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Save and Save component submit buttons should be wrapped in action type.
Added this workaround for now:
function mytheme_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
case 'webform_components_form':
case 'webform_component_edit_form':
case 'webform_email_edit_form':
// BUG: Form submit buttons consistently grouped in actions array, see #2028497
// Workaround for webform module <3.9.
if (isset($form['submit'])) {
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = $form['submit'];
unset($form['submit']);
}
break;
}
Comment | File | Size | Author |
---|---|---|---|
#4 | Issue-2028497-by-hass-Form-submit-buttons-not-groupe.patch | 1.44 KB | hass |
Comments
Comment #1
hass CreditAttribution: hass commentedComment #2
hass CreditAttribution: hass commentedLooks like there is a developer rule for this:
Form submit buttons consistently grouped in actions array
Comment #2.0
hass CreditAttribution: hass commenteda
Comment #2.1
hass CreditAttribution: hass commenteda
Comment #2.2
hass CreditAttribution: hass commenteda
Comment #3
hass CreditAttribution: hass commentedComment #4
hass CreditAttribution: hass commentedPatch attached. I'm on 3.19
Comment #5
hass CreditAttribution: hass commentedThis bug seems to be fixed in 4.x.
Comment #5.0
hass CreditAttribution: hass commenteda
Comment #6
quicksketchYeah I only made the change to 4.x because I had some minor concerns about users that had altered or themed these forms. Overall it's a minor concern though, I think going ahead and making this change in 3.x would be a good thing. Pushed up to the 7.x-3.x branch.
Comment #7.0
(not verified) CreditAttribution: commenteda