Forums

Email template? can I format the emailed results?

GreyHead 23 Oct, 2008
Hi crazyjd525,

You can do this with an html table
<table>
<tr><td>{name1}</td> . . .<td>{gender1}</td><td>{type1}</td>. . .</tr>
<tr><td>{name2}</td> . . .<td>{gender2}</td><td>{type2}</td>. . .</tr>
. . .
</table>

But this is a lot ot typing and prone to errors.

Personally I would set up the form to store the data in an array by using field names like name='m[1][gender]' 'm[1][type]', m[2][gender], etc. You can then use PHP 'foreach' loops to cycle through the array and put the results into a table format in the template.

Bob
Max_admin 23 Oct, 2008
Hi crazyjd525,

if you have v3.0 stable and emptied your email template box then you should get a template auto generated.

cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
crazyjd525 23 Oct, 2008

Personally I would set up the form to store the data in an array by using field names like name='m[1][gender]' 'm[1][type]', m[2][gender], etc. You can then use PHP 'foreach' loops to cycle through the array and put the results into a table format in the template.



This sounds like it would be great but if you have time could you explain in laymen terms for a complete non programmer? haha

Or is there a tutorial you could point me towards?

Thanks Guys!
This topic is locked and no more replies can be posted.