How do I pre-populate a node edit form before I render it?
Posted by karimahmed on October 13, 2009 at 6:57pm
I need to render a partially populated node edit form and have got it working to the point of programmatically creating and submitting the form using drupal_execute() but cannot then see how to render the partially populated form for the user to complete.
Any ideas please?
/**
* Implementation of a Drupal action.
* Create a new enquiry node and populate the passed contractors in the contractors CCK field.
* @param $objects array of contractor node IDs
* @param $context array of other parameters
*/
function contractor_enquiry(
$objects,
$context = array()
) {