Hi John,

Firstly thanks for your helpful module 'webform_skip' for drupal 7. Actually i am facing an issue, i have enabled a setting of extra page i.e 'Review & Submit' page for webform.

After installing your module .. i am able to navigate between steps but facing 2 issue :

1) No more able to view 'Review & Submit' form
2) Notice: Undefined offset: in webform_conditional_prepare_javascript()

Any help will be grateful. Thanks.

Comments

goyaltarun7 created an issue. See original summary.

joecorall’s picture

Hello,

Does this webform have any conditionals set? Are you skipping past any steps on the webform that might have a conditional configured that would prevent the form from being submitted?

Thanks,
Joe

goyaltarun7’s picture

Hi Joe,

Yes this webform has conditionals set. Actually we have applied custom validations of fields only on last step when user is going to final submit the form. Currently, there is no issue in submitting the webform just issue is that we are unable to review the whole just before the final submit and getting error when we move from review & submit tab to another tab directly.

Thanks,
Tarun Goyal

goyaltarun7’s picture

Hi Joe,

After removing conditional fields from the webform, it works fine without "Notice: Undefined offset: in webform_conditional_prepare_javascript() ". Now i'm looking into that why conditional fields creating an issue. Unable to tracked why its hiding the "Review & Submit form page".

Thanks,
Tarun Goyal

joecorall’s picture

Hi Tarun,

I think the issue with the "Review & Submit" page might be that each step of the webform needs to be completed before you arrive at that page. Perhaps this module's functionality isn't a good fit for what you're trying to do since each step has to be completed?

Joe

goyaltarun7’s picture

Hi Joe,

i tried to complete all steps but results same, i am not able to view that 'Review & Submit' page. i found one strange thing that when i clicked on 'Review & Submit' step through progress bar it does not show that content but once i am on 'Review & Submit' page and hit the refresh button then form shows.

Thanks,
Tarun

joecorall’s picture

I know if there is a required field in your webform, and you don't fill it out, the "Review & Submit" page will be blank.

Do you have the node_export module enabled? Would you be able to export your webform so I can troubleshoot on my end? I'm not able to reproduce what you're seeing.

bharti mehta’s picture

Hi Joe,

I am talking to you on the behalf of Mr. Tarun Goyal. I pasted the code below of webform export. so you can import and figure out the issue if you can. I will be grateful. let me know if u need anything else.

webform-webform-24.txt

$webform = array (
'nid' => '24',
'next_serial' => '2',
'confirmation' => '',
'confirmation_format' => 'filtered_html',
'redirect_url' => '',
'status' => '1',
'block' => '0',
'allow_draft' => '1',
'auto_save' => '1',
'submit_notice' => '1',
'confidential' => '0',
'submit_text' => 'Complete',
'submit_limit' => '-1',
'submit_interval' => '-1',
'total_submit_limit' => '-1',
'total_submit_interval' => '-1',
'progressbar_bar' => '1',
'progressbar_page_number' => '0',
'progressbar_percent' => '0',
'progressbar_pagebreak_labels' => '1',
'progressbar_include_confirmation' => '1',
'progressbar_label_first' => 'Start',
'progressbar_label_confirmation' => '',
'preview' => '1',
'preview_next_button_label' => '',
'preview_prev_button_label' => '',
'preview_title' => 'Preview',
'preview_message' => '',
'preview_message_format' => 'filtered_html',
'preview_excluded_components' =>
array (
),
'webform_ajax' => '0',
'record_exists' => true,
'roles' =>
array (
0 => '1',
1 => '2',
),
'emails' =>
array (
),
'components' =>
array (
1 =>
array (
'nid' => 24,
'cid' => '1',
'pid' => '0',
'form_key' => 'sample_field_1',
'name' => 'Sample field 1',
'type' => 'textfield',
'value' => '',
'extra' =>
array (
'title_display' => 'before',
'description_above' => 0,
'private' => 0,
'wrapper_classes' => '',
'css_classes' => '',
'replay' => 0,
'width' => '',
'maxlength' => '',
'minlength' => '',
'field_prefix' => '',
'field_suffix' => '',
'disabled' => 0,
'unique' => 0,
'description' => '',
'placeholder' => '',
'attributes' =>
array (
),
'analysis' => false,
),
'required' => '0',
'weight' => '0',
'page_num' => 1,
),
2 =>
array (
'nid' => 24,
'cid' => '2',
'pid' => '0',
'form_key' => 'sample_fiield_2',
'name' => 'sample fiield 2',
'type' => 'textfield',
'value' => '',
'extra' =>
array (
'title_display' => 'before',
'description_above' => 0,
'private' => 0,
'wrapper_classes' => '',
'css_classes' => '',
'replay' => 0,
'width' => '',
'maxlength' => '',
'minlength' => '',
'field_prefix' => '',
'field_suffix' => '',
'disabled' => 0,
'unique' => 0,
'description' => '',
'placeholder' => '',
'attributes' =>
array (
),
'analysis' => false,
),
'required' => '0',
'weight' => '1',
'page_num' => 1,
),
3 =>
array (
'nid' => 24,
'cid' => '3',
'pid' => '0',
'form_key' => 'step_2',
'name' => 'step 2',
'type' => 'pagebreak',
'value' => '',
'extra' =>
array (
'replay' => 0,
'private' => 0,
'next_page_label' => '',
'prev_page_label' => '',
),
'required' => '0',
'weight' => '2',
'page_num' => 2,
),
4 =>
array (
'nid' => 24,
'cid' => '4',
'pid' => '0',
'form_key' => 'sample_field_3',
'name' => 'sample field 3',
'type' => 'textfield',
'value' => '',
'extra' =>
array (
'title_display' => 'before',
'description_above' => 0,
'private' => 0,
'wrapper_classes' => '',
'css_classes' => '',
'replay' => 0,
'width' => '',
'maxlength' => '',
'minlength' => '',
'field_prefix' => '',
'field_suffix' => '',
'disabled' => 0,
'unique' => 0,
'description' => '',
'placeholder' => '',
'attributes' =>
array (
),
'analysis' => false,
),
'required' => '0',
'weight' => '3',
'page_num' => 2,
),
5 =>
array (
'nid' => 24,
'cid' => '5',
'pid' => '0',
'form_key' => 'step_3',
'name' => 'step 3',
'type' => 'pagebreak',
'value' => '',
'extra' =>
array (
'replay' => 0,
'private' => 0,
'next_page_label' => '',
'prev_page_label' => '',
),
'required' => '0',
'weight' => '4',
'page_num' => 3,
),
6 =>
array (
'nid' => 24,
'cid' => '6',
'pid' => '0',
'form_key' => 'sample_field_4',
'name' => 'sample field 4',
'type' => 'textfield',
'value' => '',
'extra' =>
array (
'title_display' => 'before',
'description_above' => 0,
'private' => 0,
'wrapper_classes' => '',
'css_classes' => '',
'replay' => 0,
'width' => '',
'maxlength' => '',
'minlength' => '',
'field_prefix' => '',
'field_suffix' => '',
'disabled' => 0,
'unique' => 0,
'description' => '',
'placeholder' => '',
'attributes' =>
array (
),
'analysis' => false,
),
'required' => '0',
'weight' => '5',
'page_num' => 3,
),
7 =>
array (
'nid' => 24,
'cid' => '7',
'pid' => '0',
'form_key' => 'step_4',
'name' => 'step 4',
'type' => 'pagebreak',
'value' => '',
'extra' =>
array (
'replay' => 0,
'private' => 0,
'next_page_label' => '',
'prev_page_label' => '',
),
'required' => '0',
'weight' => '6',
'page_num' => 4,
),
8 =>
array (
'nid' => 24,
'cid' => '8',
'pid' => '0',
'form_key' => 'sample_field_5',
'name' => 'sample field 5',
'type' => 'textfield',
'value' => '',
'extra' =>
array (
'title_display' => 'before',
'description_above' => 0,
'private' => 0,
'wrapper_classes' => '',
'css_classes' => '',
'replay' => 0,
'width' => '',
'maxlength' => '',
'minlength' => '',
'field_prefix' => '',
'field_suffix' => '',
'disabled' => 0,
'unique' => 0,
'description' => '',
'placeholder' => '',
'attributes' =>
array (
),
'analysis' => false,
),
'required' => '0',
'weight' => '7',
'page_num' => 4,
),
9 =>
array (
'nid' => 24,
'cid' => '9',
'pid' => '0',
'form_key' => 'sample_field_6',
'name' => 'sample field 6',
'type' => 'textfield',
'value' => '',
'extra' =>
array (
'title_display' => 'before',
'description_above' => 0,
'private' => 0,
'wrapper_classes' => '',
'css_classes' => '',
'replay' => 0,
'width' => '',
'maxlength' => '',
'minlength' => '',
'field_prefix' => '',
'field_suffix' => '',
'disabled' => 0,
'unique' => 0,
'description' => '',
'placeholder' => '',
'attributes' =>
array (
),
'analysis' => false,
),
'required' => '0',
'weight' => '8',
'page_num' => 4,
),
),
'conditionals' =>
array (
),
);

Thanks,
Bharti Mehta

goyaltarun7’s picture

Hi Joe,

Bharti was able to resolve the issue. Thanks Bharti.

The issue was on line no 85 in webform_skip.module.

Old line :
$form_state['storage']['page_num'] = $form_state['webform']['page_num'] = $form_state['values']['skip'];
New line :
$form_state['storage']['page_num'] = $form_state['webform']['page_num'] = (int) $form_state['values']['skip'];

Actually, in the 'webform.module' file inside Webform module is validating the ( page_num === page_count ) condition, is a type checking instead of only comparing which was creating that issue.

By this fix, our both issues are resolved.

Again thanks Joe for really helpful module.

Thanks,
Tarun Goyal

joecorall’s picture

Status: Active » Fixed

Thanks, Bharti and Tarun! I submitted Bharti's fix, and released a new version of this module with the fix in place.

bharti mehta’s picture

Thanks Joe for your helpful module.

Thanks
Bharti Mehta

Status: Fixed » Closed (fixed)

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