1

I'm using the module Privatemsg to give users the possibility to send messages to other users on the website.

What I would like to do is:

A button on the detail page of node with type equal to Proposal, and when a user clicks on it a, they redirect to the page messages/new where the subject and message is already filled in.

Now I just have a static button on the detail page that doesn't do anything. But how can I create the functionality that they redirect and 2 form parameters are already filled in?

2 Answers 2

0

One way to do this is to use the Prepopulate module. This solution is not specific to Privatemsg.

As the module page notes:

For example, the following URL,

http://www.example.com/node/add/blog?edit[title]=this is the title will automatically fill the Title field on a new blog post with the words "this is the title". Any field can be prepopulated this way, including taxonomy and CCK fields. You can prepopulate more than one field at a time as well.

0

Similar to the original posting requirements above, I required something similar, but used a Rules Link created Bootstrap Button situated on a Node page to which then redirected the Action Rule to the Message page and used the following syntax to autocomplete the Recipient field fill of both the message and the said Subject:

messages/new/?edit[recipient]=[node:author]&edit[subject]=[node:title]

The Prepopulate Module was utilised to provide the tokens as in [recipient] [node:author] etc.

Once implemented it was very easy and fires off very well to which the recipient gets the message and can then reply back.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.