How can I use webform field key called "name" to replace the word "anonymous" generated by the token [user-name] in the protected download email.

Therefore when a visitor receives the download link email it'll say, "Dear John," instead of "Dear Anonymous".

Hope someone can help out.

Comments

berliner’s picture

This has not been possible up to now. But it is indeed a good idea. I just changed this in the dev version. You should be able to test this using the dev release once it get's updated.

The placeholder pattern is the same as with the webform mails. In your example you can insert %value[name] into the mails body text. Given that you have a webform component with the machine name "name", the placeholder will get replaced by the data that the user has submitted.

johnshih’s picture

Thanks berliner,

I'll wait for the dev version.

berliner’s picture

johnshih’s picture

Thanks berliner, btw when are you updating this dev version?

berliner’s picture

Status: Active » Fixed

I have just released an rc2. The above mentioned changes are in there.

johnshih’s picture

Thanks berliner, this new released fixed my problem.

johnshih’s picture

Hi berliner, found a bug in this new release.

Secure download link doesn't work now.
However, it works if I change it back to the previous rc1 version.

berliner’s picture

Title: How can I use webform field key "name" in protected download email to anonymous user » Webform tokens in protected download email to anonymous user
Status: Fixed » Postponed (maintainer needs more info)

Can you elaborate on that? I can't reproduce this with the information I have.

berliner’s picture

Version: 6.x-1.0-rc1 » 6.x-1.0-rc2
johnshih’s picture

Hi berliner,

When I use rc1 everything works except it doesn’t have the ability to use webform key name. Then I upgrade to rc2 ( I didn’t change any settings ) everything works except when I click on the secure download link in my email send by the ‘rc2’, it says 'Http500 Internal Server Error' in Internet explorer, a blank white screen in firefox and server error in Google chrome.

I also try the secure link that I used previously which was working fine in rc1, but it has the same error now. However when I change my module back to rc1, both secure links in my email send by rc1 or rc2 works fine.

The Access type I’m using is : Access expires
I also use Mime Mail for all messages.

berliner’s picture

What version of webform are you using?

johnshih’s picture

Webform 6.x-3.9

johnshih’s picture

Version: 6.x-1.0-rc2 » 6.x-1.0-rc3
Status: Postponed (maintainer needs more info) » Fixed

Hi berliner,

Thanks for your new release of 6.x-1.0-rc3. I can now insert the webform value (eg.%value[name])
without any problems.

note: I've update my webform protected downloads to 6.x-1.0-rc3 and private Upload to 6.x-1.0-rc3.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mardok’s picture

Version: 6.x-1.0-rc3 » 7.x-1.x-dev
Component: Code » Documentation
Assigned: Unassigned » mardok
Status: Closed (fixed) » Active
berliner’s picture

Status: Active » Fixed

For D7 this issue should be obsolete. Documentation on the possible tokens is given in the description for the textfields.
@mardok: Please explain your changes to version, component and status of this issue if they are still relevant in your opinion.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.