Skip to main content

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".

Image from Gyazo

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:

Image from Gyazo

More information

For more information on customizing e-mail notifications, see:


Support

If you have any other questions, please contact us or check out Our Slack Community.