[support] how to associate a node/add form to the node in the URL/loaded?
sebastian
inforazor at gmail.com
Tue Sep 25 23:09:41 UTC 2012
Hello,
I have a node/add form for a Task node that is loading in a block.
The Task needs to have a node-references automatically made for it (the
user shouldn't see it or be able to alter it) that attaches (points) to
the node which is being primarily displayed.
So if you are on a Project page, you have the block for add task on the
left, and I want this task to point to the Project node. The node is
loaded and also in the URL path.
The block that loads the add/Task does:
<?php $form = node_add('project_task'); ?>
Which $form variable do I set in the node/add form to have this default
correctly?
I see the variable in the form for the CCK field, just need to know how
to associate it... #nid to set? #default_value? I tried #default_value
but this doesn't seem to pass forward when rendered.
Thanks for your guidance!
Kindly,
Sebastian.
More information about the support
mailing list