19 Feb
2006
19 Feb
'06
1:26 a.m.
I need to initialize the body field of nodes that are NOT created by my module, taking a piece of the query string to look up the value to use. With version 4.6, I would set the value of $node->body using hook_nodeapi(), $op='form pre'. With version 4.7, I'm initializing the $node->body using hook_nodeapi(), $op='prepare'. If I dump the $form_values array that is passed to hook_alter(), I find $form['#node']['body'] and $form['body_filter']['body']['#default_filter'] contain the value I assign in hook_nodeapi() but the field form doesn't use the value. Is there a nice, straigtforward explanation of how to prefill a form field?