Closed avpaderno closed 1 year ago
https://docs.backdropcms.org/form_api#special-elements does not report that #attached can be used with a form, despite code like the following one is correct.
#attached
$form['#attached']['js'] = array( backdrop_get_path('module', 'ajax_example') . '/ajax_example.js', );
With that code, #attached is added directly to $form, not a form element. #attached should show a checkmark also for form.
$form
Thanks, @kiamlaluno! Fixed.
https://docs.backdropcms.org/form_api#special-elements does not report that
#attached
can be used with a form, despite code like the following one is correct.With that code,
#attached
is added directly to$form
, not a form element.#attached
should show a checkmark also for form.