Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey,
I'm trying to add some attributes to the nodereference_explorer fields like this:
$form[$field_id][0]['#attributes'] = array('onblur' => <js_function>);
but the attribute itself is not rendered (eventually to the HTML).
just as a monitor, if I change the #title (the same way) it works...
Comments
Comment #1
gnindl CreditAttribution: gnindl commentedThanks for pointing this out. Attributes are rendered now enabled by this patch:
http://drupalcode.org/project/nodereference_explorer.git/blobdiff/e16208...
In your specific case you might also consider using Drupal JavaScript behaviors.