I have been stuck on this for quite a while now.
I have some nodes which I pick out through a query.
I want to display these nodes in a customized way and associate a set of radio buttons to each node.
The user will then chose a radio button for every node displayed and finally submit the form.
I wont go into the details of the module that I'm developing, but this is basically what I am stuck on at the moment from a couple of days and cant think of anything.
How can I go on about this? I would really like to load each node with node_load default functions and then associate the radio buttons to each node.. but I dont see how I could integrate this into my module.
Another thing would be to use the theme's templates by declaring a node-mynode.tpl.php template... but then how do I hook up the radio buttons to each node??
I'm confused on other ways as well: like the form_alter hook or by ovverriding the theme_form method.. I dont know how to access my form values exactly and if this is the correct way anyway..
To give you an idea of the code structure:
- I have a multistep form (the form generating function is implemented through a switch/case on the
$step
number
- in step 2 I generate a number of nodes according to parameters given in step 1