Hello CCK folks, I'm trying to write a custom Module that will allow me to read the value pairs in a multi-select box, and to then delete, change and/or add new values to that multi selection.
Assuming the name of the text_field is known, what is the function / hook I need to use to work on the CCK field?
I have been clicking in circles between all the places I can possibly imagine, and I can't seem to find the API for CCK which is mentioned "to exist" in several places, but never with a link to it... I did find a list of hooks, but those don't seem to cover the functions I need...
:-(
Google, Lullabot, Drupal->Documentation, this thread: http://drupal.org/node/139909, and even the main page: http://drupal.org/node/101742 all seem to not show any API related links/information... am I just not seeing it? Instead I have found lots of code snippets; which is nice if the snippet is exactly what you need...
Thanks for any help you can provide!
Sebastian.

Comments
2 ways I can think of
1) The allowed values list, as entered from the field settings panel, is stored in the field settings table in the database, serialized. CCK provides APIs to read this information, but updating is a bit more tricky as it involves the CRUD stuff, so I would discard this.
Another method that would be easier to maintain is:
2) In the field settings panel you can enter PHP code to generate the allowed values list. Well, you can simply put
return mylist();here, and your module can implementmylist()reading the values from somewhere else. Your module could implement a CRUD application to allow the user maintain that list.(*) CRUD = Create, Read, Update, Delete.
Hi Markus! Thanks for the tip
Hi Markus! Thanks for the tip to use a return() function! That's an excellent tip, and far less complicated than all the serialized data in the table. So I will follow that route, thanks!
BTW, you also mention that there are API's... where can I see the API's, are they documented? Or is my only convention searching through the actual .module and .inc files?
Best regards,
Sebastian.