Take the 2-minute tour ×

I want assign certain values to some of the cck fields through Java script while the form is loaded. I think it is best to use the body/ form onload attribute. But how do i define that in drupal? Could someone help me with this or a better solution?

share|improve this question
add comment

1 Answer

As with many other tasks, Drupal has its own 'way' of handling JavaScript functionality within a site. It needs a little bit of learning and 'getting used to', but pays of in the long run.

Start with JavaScript in Drupal and work through the articles linked from there. Also, don't miss this overview of the JavaScript API.

share|improve this answer
add comment

Your Answer


