My custom module attaches extra js as follows.

 function MYMODULE_form_webform_client_form_alter(&$form, &$form_state) {
  $form['#attached']['js'] = array(drupal_get_path('module', 'MYMODULE') . '/js/MYMODULE.js',);
  }

When this module is enabled, webform.js is not loaded. Looks like a bug - unless I have overlooked a documented workaround?

Comments

DanChadwick’s picture

Category: Bug report » Support request
Status: Active » Fixed

You are overwriting webform's #attached. Use [] = to append rather than = array() to overwrite.

The bug is in your code.

John_B’s picture

Many thanks

Status: Fixed » Closed (fixed)

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