Problem

  • Submit buttons should be positionable on a webform.
  • Multiple submit buttons should be allowed on a webform
  • There are too many buttons spread out on the Webform settings page making it difficult to customize a webform's submit buttons (aka actions)

Solution

Create a dedicated "Submit button(s)" [webform_actions] element.

Tasks

  • Create WebformActions form container
  • Create WebformActions plugin
  • Convert default_form_submit_* to default_form_submit_button_*
  • Move all customized buttons from the webform settings to a dedicated element.
  • Add 'Customize submit button(s)' to webform element UI.

Notes

  • Hide/show buttons based on $webform settings.
  • Use \Drupal\webform\Element\WebformActions::processWebformActions to copy ::submit and ::validate to corresponding buttons.
  • Must merge button class names.
  • Might have to create unique ids from all buttons [element_key]__[button_name]
  • Submit button(s) must be a root item
  • If actions is the last element as new element before it. @seeWebform::setElementProperties

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

Title: Allow actions (aka submit buttons) to be place anywhere on a webform » Allow actions (aka submit buttons) to be placed anywhere on a webform

  • jrockowitz committed 3c22371 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed a47a995 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed 4fb9bc3 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed 21c51d3 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed 6213361 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed 4fdedba on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed b121f4d on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...
jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new238.5 KB

Status: Needs review » Needs work

The last submitted patch, 10: allow_actions_aka-2878193-10.patch, failed testing.

  • jrockowitz committed a8e3689 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new241.29 KB

Status: Needs review » Needs work

The last submitted patch, 13: allow_actions_aka-2878193-13.patch, failed testing.

  • jrockowitz committed 73b81f7 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new252.09 KB

  • jrockowitz committed d31a9a4 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed e04ffc4 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed bee2c46 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed 2451e5c on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...
jrockowitz’s picture

StatusFileSize
new260.1 KB

Status: Needs review » Needs work

The last submitted patch, 21: allow_actions_aka-2878193-20.patch, failed testing.

  • jrockowitz committed 83802f5 on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new260.13 KB

  • jrockowitz committed 3b18f9a on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed 139b77a on 2878193-submit-buttons
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

  • jrockowitz committed c50fe53 on 8.x-5.x
    Issue #2878193 by jrockowitz: Allow actions (aka submit buttons) to be...
jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz committed 646847e on 8.x-5.x
    Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.