I have been trying to search for an answer to this but I am not entirely sure what to ask. I am using drupal 7. What I am trying to accomplish is being able to create a campaign, and then allowing users to order a product within that campaign.
So currently I have a content type of campaign and a content type of order. I create a new campagin and then un-authenticated users should be able to create new Order nodes, but what I am not sure how to do, is link the orders to the campaign. So http://www.domain.com/campaign/name would have a form on it that generates a new order node.
It seems like I need to have entity reference in the order content type, but how to I populate that field because I don't want the user to select which campaign, it should be automatic. Hopefully that makes sense, the only way I have thought to accomplish this would be to parse the uri and try to get the campaign name then lookup the campaign nid. Seems kind of hackish though. Thanks!