I have a node which has data within it but if one of the fields is missing then I want to be able to let a user add the missing data using a custom type. At the moment this can be done with the auto select field and they can start typing the title and voila on hitting enter the node is selected for them.

However , the way that makes more sense is that if a field is missing on a node then I can have a link that says ADD USER FIELD HERE and then when they click on it the custom node comes up with just that field available and then they can submit it. My content template then can select it from the new contemplate table later and siplay appropriately.

So the question is how can I get Drupal to allow adding data without having to have the user specify the node ID first.

An example is this entry form: http://www.redeyereview.com/addreview where a user can add the review for moderation but I would like it to be clickable from a previous movie page in teh form of ADD A REVIEW FOR THIS MOVIE.

Thanks all.

Comments

Capricorn20’s picture

I've answered my own problem now.

On the page I wish to add a user review for I have created a session variable which is then referenced within the default value section in PHP on the user review content type, then I whack the session variable.

if (isset($_SESSION['var1'])){
return array( 0 => array('nid'=>$_SESSION['var1']));
unset($_SESSION['var1']);
}

So far all seems to be working as I expect it to.

Happy days!