How do I include user details in the thank-you e-mail?
You can include specified member details in your thank-you message by one of two ways:
You can also use both these methods in notifications to admins.
Using assign_member_detail
You can add user details in Form - Basic settings as shown below.
Sample code
In the "Thank-you e-mail" field, select "Send" and paste in the following code under "Content":
Thank you for your submission.
{assign_member_detail var=member_detail member_id=$smarty.session.member_id}
Form submitter details:
Family name: {$member_detail.name1}
Given name: {$member_detail.name2}
Member ID: {$member_detail.member_id}
Setting member_info_flg = true
in the InquiryMessage::send
endpoint
If you want to include all of a member's details in the inquiry header, enable the relevant endpoint parameter as follows.
In the endpoint settings dialog for InquiryMessage::send
, check the box member_info_flg
under "Advanced settings".
Sample code
Then, in the "Thank-you e-mail" field, select "Send" and paste in the following code under "Content":
Thank you for your submission.
Form submitter details:
Family name: {$member_info.name1}
Given name: {$member_info.name2}
Member ID: {$member_info.member_id}
The member details will be assigned to the member_info
variable if the form submitter is logged in.
Available member detail variables
The list of stored information can be verified in the body of the sent e-mail with @debug_print_var
:
Using assign_member_detail
{assign_member_detail var=member_detail member_id=$smarty.session.member_id}
{$member_detail|@debug_print_var}
Using member_info_flg = true
{$member_info|@debug_print_var}
They will be displayed in the e-mail message:
More information
For more information on customizing e-mail notifications, see:
- FAQ: Can I customize my thank-you e-mails?
- FAQ: How do I include content from the original form submission in the thank-you e-mail?
- FAQ: How do I display inquiry numbers in thank-you e-mails and notifications?
- FAQ: Can I modify the content of the notification e-mail for each form?
- Reference: List of available variables in the Message template
- FAQ: Can I change the recipient email address based on the options selected in the form items?
Support
If you have any other questions, please contact us or check out Our Slack Community.