Skip to main content
added 10 characters in body
Source Link
yvan
  • 4.3k
  • 19
  • 16

I never tried, but I guess you can do it like that :

$form['#attached']['js'] = array(
  array(
    'data' => drupal_get_path('module', 'radio86_media') . '/select_media.js',
    'type' => 'file'
  ),
  array(
    'data' => array('radio86_media' => array('barfoo' => 'booboo')),
    'type' => 'setting'
  )
);

According the documentation you should be able to add settings and files.

I never tried, but I guess you can do it like that :

$form['#attached']['js'] = array(
  array(
    'data' => drupal_get_path('module', 'radio86_media') . '/select_media.js',
    'type' => 'file'
  ),
  array(
    'data' => array('radio86_media' => array('barfoo' => 'booboo')),
    'setting'
  )
);

According the documentation you should be able to add settings and files.

I never tried, but I guess you can do it like that :

$form['#attached']['js'] = array(
  array(
    'data' => drupal_get_path('module', 'radio86_media') . '/select_media.js',
    'type' => 'file'
  ),
  array(
    'data' => array('radio86_media' => array('barfoo' => 'booboo')),
    'type' => 'setting'
  )
);

According the documentation you should be able to add settings and files.

Source Link
yvan
  • 4.3k
  • 19
  • 16

I never tried, but I guess you can do it like that :

$form['#attached']['js'] = array(
  array(
    'data' => drupal_get_path('module', 'radio86_media') . '/select_media.js',
    'type' => 'file'
  ),
  array(
    'data' => array('radio86_media' => array('barfoo' => 'booboo')),
    'setting'
  )
);

According the documentation you should be able to add settings and files.