Elaborate on use of #attached in form reference for attaching inline and settings

Created on 5 May 2011, about 14 years ago
Updated 26 March 2025, about 2 months ago

Hi
With D7 the #attached property is the correct way to add javascript/css to ensure that our files are always loaded even with cached output however the way to add javascript settings is not evident from http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....

Whilst one can figure it out if they read up on drupal_process_attached a clear example would help.
The attached patch adds a new example of how to add js settings using attached.

✨ Feature request
Status

Closed: won't fix

Component

API documentation files

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024