By jefgodesky on
I'd like to make a link to /node/add/type, so regular users can easily add content of that type, but I'd like to also pass along a default value for the taxonomy term field, so that the new node will belong to the same term the user just came from, without the user having to worry about it. Is there some parameter I can add to the link to accomplish this?
Comments
I did it!
With the Prepopulate module (and the most recent patch to port it to Drupal 7), I was able to set up a link to
node/add/TYPE?edit=field_TERM[und][value]=IDWhere
Assuming that your taxonomy is in a select list. The link might look a little different if you have that field set up differently.
Typo
I'm sorry, that's incorrect; it should be:
/node/add/TYPE?edit[field_TERM][und][value]=ID