Custom receipt email body based on a form select box selection


(Jason Lubiejewski) #1
We have a form where users can submit a question.

What are the major steps in having Matrix send a receipt email with a custom body based on which select box option the user has chosen?

Some types of questions only require an auto response.

Each different body will contain a lot of HTML.

ReportForm.gif (8.31 KB)


(Nic Hubbard) #2

Look at the Selective Emails screen. This will allow you to use the value of the Select field to send either a Receipt, Recipient, or Send to a Friend email. So, you can configure each of those emails with your contents. Just make sure not to enter anything in the "To" field for those emails on the Email Options screen. Do that on the Selective Emails screen.


(Jason Lubiejewski) #3
Thanks Nic and I note your huge contributions here and a similar solution you used recently. Is this the most appropriate way to do it?
I will have about 7 different custom email body's, not just 3.

(Bart Banda) #4

You could keep the content outside of the asset in standard pages for example, and then use the asset contents keyword as a modifier based on the response value from the select field response. For example:

 

%response_1234_q1^eq:value1:1111:0001^as_asset:asset_contents_raw%

 

%response_1234_qa^eq:value2:2222:0001^as_asset:asset_contents_raw%

 

%response_1234_q1^eq:value3:3333:0001^as_asset:asset_contents_raw%

 

etc...

 

Where 1111, 2222, 3333 are asset ids of standard pages with your content, and 0001 is an asset id of a standard page or div with no content in it (in case you get errors trying to do as_asset modification on something that is not an asset ID.