Active
Project:
Content Construction Kit (CCK)
Version:
6.x-2.7
Component:
optionwidgets.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Jul 2010 at 15:17 UTC
Updated:
7 Feb 2011 at 05:14 UTC
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
Comment #1
mustanggb commentedCould someone give an example of how to do this with current work-arounds?
I've tried numerous different ways, none of which are working
Comment #2
FranciscoLuz commentedMy 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.
Comment #3
soyoung.shin commented+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.
Comment #4
karschsp commentedsubscribe
Comment #5
hypertext200I'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