如何给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

猜你喜欢

转载自www.cnblogs.com/qinqiu/p/9052078.html
今日推荐