By Antinoo on
I've added two new content types, Son and Father.
When I'm on the node/add/son page, I'd like to display the Father node (with nid=123) before the son_node_form.
This is the code I've written so far:
function sons_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) :
case 'son_node_form':
$father = node_load(123);
/* What do I need to write here? */
break;
endswitch;
}
As I said, what do I need to write there?
In other words, how can I "transform" a node into its FormAPI-equivalent?
As an alternative, can I use a form-son-node-form.tpl.php (or something like this) template to theme the son_node_form?
Thanks for any hint.
Comments
+1
+1
This works for me (D6)