If I rename the submit button of the form to something other than `Submit`, ie. `Apply`, the form submit function aborts. After examining the code, it appears `webform_completed` is set to false instead of true in the `webform_client_form_pages` function (which is called prior to `webform_client_form_submit`). I believe this can be fixed by examining the type instead of the value of the button since there can only be one submit button on the form, correct? Examine the snippet below which was extracted from the `webform_client_form_pages` function in webform.module.

2374   // Assume the form is completed unless the page logic says otherwise.
2375   $form_state['webform_completed'] = TRUE;
2376 
2377   // Check for a multi-page form that is not yet complete.
2378   $submit_op = !empty($form['actions']['submit']['#value']) ? $form['actions']['submit']['#value'] : t('Submit');
2379   $draft_op = !empty($form['actions']['draft']['#value']) ? $form['actions']['draft']['#value'] : t('Save Draft');
2380 
2381   if (!in_array($form_state['values']['op'], array($submit_op, $draft_op))) {

Before I submit a patch, I would like to get some feedback from the maintainers to make sure I understand the reasoning behind this logic decision.
Thanks

Comments

uberhacker created an issue. See original summary.

Liam Morland’s picture

Status: Needs work » Closed (won't fix)

Webform 7.x-3.x gets only critical bug and security fixes. Please upgrade to Webform 4.

"needs work" is for issues that have a patch which needs work.