It's certainly possible now, but you have to create the HTML content in server connect. Put the table row in a repeat which populates a variable and then use the variable in the mail body. The variable within the repeat might look something like:
If you get a hang of it, you can create a custom extension for it with dynamic header names & values from a repeat and return a HTML table in response.
I have been planning to do so, but haven’t had the time… nor had a use case for any client in recent past.
Please bare with me, but I need to ask for clarification regarding this method of getting dynamic variables to print inside an email message. The code below is the repeat inside the generated table that displays the data inside the email.
My question is this:
Inside the repeat I need to Set Values for each of the dmx-text fields as seen in the code above, i.e., school_field, school_name, school_location, and request_adjusted_amount?
Would this be correct for the first variable: Set Value var_school_field = {{school_field}}
Then the others would follow this syntax below:
To display this inside the email all I have to do is place the following in their appropriate places:
{{var_school_field}} {{var_school_name}} {{var_school_location}} {{var_request_adjusted_amount}} ?
To create the variable, include the fields you need in each table row. Eg if your variable is named var_schoolDetails, the expression for the variable might be:
For this part of the html body, you would just include the variable in the relevant place, eg:
In this case, I have other rows above and below this one, which could also include variables or static content.
I think the most difficult part of creating HTML emails is none of the above, but the actual HTML. If you’re not familiar with HTML emails, you’ll need to do some research. The HTML has to look as if it was written about 20 years ago, using nested tables and limited layout (no Bootstrap etc.). It should probably look like some pretty awful code.
Thank you Hyperbytes. I’ll take another look at your post again today…
One of my faults is that I have to understand the ‘why’ and the syntax. The older I get, the less patience I have for putting scattered puzzle pieces together. Ha!
AH, old post so some differences
yes they are actually two single quotes and were just to set an empty string
$Parent was a term used to refer to a value in a “container” for example
So if you set value myvar = ‘’ i.e. an empty string
You then make a repeat and inside that repeat you again use a set value, say set value myvar = “hello” Wappler would treat those two variables as separate variables as they were set in a difference scope
So in the loop myvar = 'hello" and $parent.myvar refers to the one outside the repeat which still has the value of a empty string = ‘’
I believe $parent is no longer needed, Wappler handles it for you, not 100% sure to be honest as I tend to use session variables now rather than set value to simplify this very issue.