Enabling the new "Preview page" feature causes an issue on forms that are a single page (i.e. no pagebreaks).
All of the "submit" buttons (e.g. Submit, Preview, Previous) appear with the text "Submit".
When viewing the form, the following notice is generated:
Notice: Undefined offset: 1 in webform_client_form() (line 2380 of [...]/webform/webform.module).
Which corresponds to
elseif ($page_num < $page_count) {
$form['actions']['next'] = array(
'#type' => 'submit',
'#value' => $next_page_labels[$page_num], // line 2380
The $page_num is 1, but the $next_page_labels only has a value for index 0.
Comments
Comment #1
spadxiii commentedI just ran into this issue as well and made a little patch.
The issue is that the next/prev button labels are appended to an array but that array is empty. This means they get index 0, while further in the code, it's looking for index 1 for the next button (and for the previous button 2).
Comment #2
spadxiii commentedComment #3
quicksketchThanks guys! Great to have the preview functionality well tested before the next release. I've committed this patch on top of #435232: Summary/review/preview page before final submission in multistep forms and it should be in tomorrow's release.
Comment #5
fenstratNeeds porting to 8.x-4.x.
Comment #6
fenstratCommitted 2f48d41 to 8.x-4.x.