<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: How to add custom template variables?</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: How to add custom template variables?</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 04:41:00 +0000</pubDate>

<item>
<title>Trowar on "How to add custom template variables?"</title>
<link>https://www.machform.com/forums/topic/how-to-add-custom-template-variables#post-10851</link>
<pubDate>Fri, 12 Nov 2010 00:22:27 +0000</pubDate>
<dc:creator>Trowar</dc:creator>
<guid isPermaLink="false">10851@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks Yunair,&#60;/p&#62;
&#60;p&#62;I figured out what I was doing wrong. I added the code&#60;/p&#62;
&#60;p&#62;$template_variables[$i] = '{rvdate}';&#60;br /&#62;
$template_values[$i]    = $rvdate;&#60;br /&#62;
$i++;&#60;/p&#62;
&#60;p&#62;and it didn't work. I realised I had to popluate $rvdate as Machform wasn't doing this for me. &#60;/p&#62;
&#60;p&#62;$rvdate = 'test';&#60;br /&#62;
$template_variables[$i] = '{rvdate}';&#60;br /&#62;
$template_values[$i]    = $rvdate;&#60;br /&#62;
$i++;&#60;/p&#62;
&#60;p&#62;So it turns out it was simple to do :)&#60;/p&#62;
&#60;p&#62;Many Thanks for your help.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "How to add custom template variables?"</title>
<link>https://www.machform.com/forums/topic/how-to-add-custom-template-variables#post-10850</link>
<pubDate>Thu, 11 Nov 2010 20:19:40 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10850@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I must say this one won't be quite simple to do.&#60;/p&#62;
&#60;p&#62;Basically, the code which parse the template variables is within the &#34;includes/helper-functions.php&#34; file.&#60;br /&#62;
Around line 306, you'll see a bunch of code which creates the template variables and assign the values. This code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$template_variables[$i] = &#38;#39;{date_created}&#38;#39;;
$template_values[$i]    = $date_created;
$i++;
$template_variables[$i] = &#38;#39;{ip_address}&#38;#39;;
$template_values[$i]    = $ip_address;
$i++;
$template_variables[$i] = &#38;#39;{form_name}&#38;#39;;
$template_values[$i]    = $form_name;
$i++;
$template_variables[$i] = &#38;#39;{entry_no}&#38;#39;;
$template_values[$i]    = $entry_id;
$i++;
$template_variables[$i] = &#38;#39;{form_id}&#38;#39;;
$template_values[$i]    = $form_id;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I suppose you could add any custom template variables there, below those lines.&#60;/p&#62;
&#60;p&#62;I hope that helps.
&#60;/p&#62;</description>
</item>
<item>
<title>Trowar on "How to add custom template variables?"</title>
<link>https://www.machform.com/forums/topic/how-to-add-custom-template-variables#post-10828</link>
<pubDate>Tue, 09 Nov 2010 18:52:39 +0000</pubDate>
<dc:creator>Trowar</dc:creator>
<guid isPermaLink="false">10828@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am using machform and wish to include custom template variables into my e-mails.&#60;/p&#62;
&#60;p&#62;For example. When an entry is entered added to the ap_form_1 table, my site automatically adds some additional fields (rvplace, rvtime, rvdate, payref, paystatus, etc..).&#60;/p&#62;
&#60;p&#62;In an e-mai I can put {element_1} in and it will populate from the machform database. How can I get my site to accept {rvplace} and to auto populate the field with that name from the database as well?&#60;/p&#62;
&#60;p&#62;Many Thanks,&#60;/p&#62;
&#60;p&#62;Peter Cunningham.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
