I'd like to make tokens available for the invitation message from the user_relationship_invites module. To do this, I can implement hook_token_list and hook_token_values in that module, but I don't have access to the relationship type that was selected when the hooks run. They are not included in the object used to generate tokens, and they are not yet in the database where I can look them up.

The solution I used was to create a form element of the invitation object with all of the values from the form. Then the token hooks in user_relationship_invites can just pluck the values the module put there out of the form.

A patch is attached.

CommentFileSizeAuthor
invite-form-token.patch566 bytesscottgifford
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scottgifford’s picture

An example of a some code that takes advantage of this patch is at http://drupal.org/node/542450

ckng’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Cleaning out old issues.