[support] Javascript and CCK fields
Joel Willers
joel.willers at sigler.com
Wed Mar 2 13:53:37 UTC 2011
I’m looking to do calculations between CCK fields. I’ve found some cool ways to add Javascript to a page, but before I get too far into this, I figured I’d ask for some quick advice to see if there was a better way.
Basically, I’m looking to do math on an ‘onchange’ event. If Field A is set (base) and Field B is changed, Field C and D automatically update. Similarly, if C changes, B and D update, and same for D changing B and C. I’m planning to use the technique described at:
http://switchbackcms.com/blog/right-way-include-javascript-your-drupal-form, but at http://drupal.org/node/322290 (#7) there is talk of adding a theme function, which I’m guessing I could do using a nice tpl.php file.
Any suggestions are welcome, especially if there is an already existing module for field relationships.
Joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110302/415c0c00/attachment.html
More information about the support
mailing list