Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Im using profile 2,
I want to include profile 2 field into Webform email.
I have tried these method:
1. Add %profile[field_pro2_ref] into email
2. Create new hidden component, with %profile[field_pro2_ref] as default values.
But both shows empty result on the email sent.
Thanks
Comments
Comment #1
fizk CreditAttribution: fizk commentedIf you're using Drupal 7, install the Entity API module and enable Entity API and Entity tokens.
Now you'll see the profile tokens under "Users". Your token could look something like
[user:profile-main:field_full_name]
.Comment #2
shadowdknight CreditAttribution: shadowdknight commentedHi,
It works, Thanks!
Comment #3
leanne9 CreditAttribution: leanne9 commentedHi Shadowhitman and fizk,
How were you able to use the token in the webform? I am trying to use one as a default value for "first name," and the value for that on my tokens list is "[current-user:field_first_name]" -- (though I could use [profile2:user:field_first_name] )
Do I need to put anything other than [current-user:field_first_name]? It doesn't seem to be working that way, also tried preceding it with %, %token, %profile, %user, nothing seems to be working.
Are you using Webform 3.x or 4.x?
Any help is appreciated! Thanks :)
Comment #4
fizk CreditAttribution: fizk commentedThe module we are using is not webform, but a fork of it, called webform patched.
Comment #5
pelicani CreditAttribution: pelicani commentedThis works great in Webform 4, no patch required.
Format of token looks like ... [current-user:profile-main:field_profile_last_name]
This helped Us.
good Luck.