Community & Support

Drupal Form Element ID's - Hyphen issue with Javascript

Hi Guys,

I am trying to modify some selection list form elements with Javascript. The problem is the default Drupal ID's for these elements seem to be hyphenated ie:

edit-cod-delivery-month

These elements can't be passed to javascript. (obviously jQuery must have some workaround).

How would I change the element to not be hyphenated, seem like this is a low level core function?

regards

Hix

Comments

Anyone ever used JavaScript

Anyone ever used JavaScript to modify a drupal form?

I can rewrite the entire form

I can rewrite the entire form (most of it) in my own way using the theme overrides, so I don't see a problem.

---
My personal D6 project: http://getlives.com
My portfolio: http://www.tapskill.com

nobody click here