hook_field's $node_field parameter is defined as "the contents of the field in this node".
Does that mean if my content type is a text field this will be a string? Or is it an array of the widgets within this field? If so, what's the structure of the widgets? I just don't know!
Can there please be more description of the structure of the parameters?
Comments
Comment #1
leeksoup commentedI'll second that! I'm actually trying to figure out what content_taxonomy does as it's not working, but am getting hung up on what $node_field is actually supposed to be.
Comment #2
chrisfive commented+1
Comment #3
GabiAPF commentedThirded. I'm trying to fix that part of content_taxonomy as well.
Comment #4
xtfer commentedHaving been looking at this all weekend, $node_field seems to contain the value of the field in whatever format the cck field specifies it.
One way to find it is to add the following at a point in the hook_field function for the field type you are investigating. Beware this will STOP all rendering after the "die" statement, so be prepared for any submit or load action to fail at that point. You should have the contents of your $node_field printed to the screen however.
I then hit the back button, go to my editor and remove this code, then attempt the load/submit again. Don't use this on production sites.
Comment #5
karens commentedThe D5 version is no longer being supported. Sorry.