Hi,

Getting ahah and cck fields working together in hook_form_alter is a daunting task requiring a lot of work around and often ending up in frustration.
See this thread here http://drupal.org/node/390452#comment-1990852 (this solution doesn't work by the way but may give a light up to a guru, it also has links to other related threads)

It would be nice if the user could bind the ahah property options (like event, path and wrapper) when setting the cck widget options. The 'path' option could be hooked up with ahah_helper_path function, in that way the user would only need to input the values to generate the argument array to be passed to ahah_helper_path function.

Cheers

Comments

mustanggb’s picture

Could someone give an example of how to do this with current work-arounds?
I've tried numerous different ways, none of which are working

FranciscoLuz’s picture

My cumbersome solution is to assign the CCK field data to a field programmatically created in the #after_build function (see more about this topic here http://drupal.org/node/726282).
By doing that I can easily bind the #AHAH property to the custom created field, do what needs to be done and assign the value back to the cck field once the form has passed validation and is ready to be saved.
I won't post my code in here first because it is a absolute mess and second because this is not the right approach.

soyoung.shin’s picture

+1 I'd also like to see this implemented. This is incredibly difficult, and all the current methods of implementation (see link on first post, and links attached to that post) are super hacky.

karschsp’s picture

subscribe

hypertext200’s picture

I've written a small code snipped for this to work for my work, it worked fine for me and added to blog, sharing it for other ppl http://www.heididev.com/using-ahah-cck-field