Timeline for Where should I put this JavaScript code ... the Drupal way?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2012 at 21:37 | vote | accept | Rosamunda | ||
Nov 15, 2011 at 7:39 | comment | added | tecjam | I would stick it into a custom module or your template.php file. You should be able to use the hook_form_alter - use prefix to add things before the form (labels chars left etc ..), use the attributes like so to add onkeyup, onkeydown functiosn to the field itself.$form['field_name]['#attributes'] = array('onkeyup' => array('jadajada ...')...); } | |
Nov 11, 2011 at 19:04 | comment | added | Rosamunda | Anyway, I have trouble with the second part of the code, whare should I put it to modify the comment form output? | |
Nov 8, 2011 at 21:56 | comment | added | Rosamunda | Hi there, Thanks for your answer, but it won´t work on comments, just on CCK fields... | |
Nov 8, 2011 at 14:59 | history | edited | avpaderno♦ | CC BY-SA 3.0 |
added 13 characters in body
|
Nov 8, 2011 at 9:15 | history | answered | tecjam | CC BY-SA 3.0 |