Fill in user reference from current user page while adding new content I have a view with appointments displayed at the user profile page (using pages for this) that is specific to that user.

While adding a node (appointment type) I can select the user(user reference) that the appointment is made with.

Now, I would like to add a link at the bottom of that view so I can add a new appointment and at the same time pass in the user id/name of the current viewed user, so I don't have to manually select the user again.

Any suggestions?
If you're using "Entity reference" module for the user reference field, you could use http://drupal.org/project/entityreference_prepopulate module which allows to set the entity id with an URL parameter.

For example, if the field name is "field_user_reference", and the entity you're creating is "appointment", you'll have to generate a simple link like:


  node/add/article?field_user_reference=UID


Instead, if you're using "References" module, you can install and enable http://drupal.org/project/userreference_url which does the same, although the syntax is a bit different:


  node/add/article?user_reference=UID


I hope this will help.