[development] Form API: Is this possible?

Earl Dunovant prometheus6 at gmail.com
Sun Feb 19 00:26:15 UTC 2006


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20060219/fc74ab92/attachment-0001.htm


More information about the development mailing list