Prepopulating Private Message fields

Last updated on
30 April 2025

If you are trying to pre-populate the private message fields this how to do it. Like the drupal body field there is an array called privatemsg which needs to go first.

e.g.

http://yoursite.com/messages/new?edit[privatemsg][recipient]=name&edit[p... line

To get the just the text name in the recipient I put this as recipient

print strip_tags($name);

Help improve this page

Page status: Not set

You can: