HI,
I posted a topic a while back and it got no replies. I think it was because the problem was not stated clearly enough. I'll try again (and I also have a few other observations about the problem that may help):
I'm creating a module that defines a new node type. In the form_hook there is a call to form_select enabling multiple selections. It is my understanding that the $values parameter is handed an array this way:
array($node->cat1{0},$node->cat1{1},$node->cat1{2},$node->cat1{3},$node->cat1{4})
The entire function call is of the following form:
$output .= form_select(t('Category 1 (select up to 5)'), 'cat1',
array($node->cat1{0},$node->cat1{1},$node->cat1{2},$node->cat1{3},$node->cat1{4}),
_nodename_get_options('cat1'),'For multiple selections: PC - hold down key; Mac - hold down key','',TRUE,TRUE);
/*
( _get_options is the function that returns the associative options array. )
*/
I am defining a node with this module, so I am using a table that joins on the node table for the data in the form. So in the update etc. hooks I refer to the form values as:
'update.... cat1item1=$node->cat1{1}, cat1item2=$node->cat1{2},... '
Interestingly, what happens is the data in the table is set correctly, but I only know this due to checking the mysql table directly. The data is not accessible to output and is not accessed by the form hook or by the page hook despite my attempts. Here is what the failed page hook code looks like: