如何给form添加attachedment

$form['attched']['js'][] = 'file_path'

这样是行不通的,反正处理不到

$form['notification_email']['#attached']['js'][] = array(
  'data' => 'file.js',
  'type' => 'file'
);

但这样就可以了

https://www.drupal.org/forum/support/module-development-and-code-questions/2011-01-13/fapi-attached-javascript-settings

posted @ 2018-05-17 17:09  qqisnow2021  阅读(191)  评论(0)    收藏  举报