<?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: Order of answers in email</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Order of answers in email</description>
<language>en</language>
<pubDate>Sat, 07 Nov 2026 07:02:41 +0000</pubDate>

<item>
<title>yuniar on "Order of answers in email"</title>
<link>https://www.machform.com/forums/topic/order-of-answers-in-email#post-164</link>
<pubDate>Thu, 25 Oct 2007 15:35:45 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">164@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;To fix this bug, modify &#60;strong&#62;includes/helper-functions.php&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Around line 166 you'll find this code:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;function send_notification($form_id,$table_data){&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Now, right under that line, paste the code below:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$query = &#38;quot;select
				element_id,
				element_total_child
			from
				ap_form_elements
		   where
		   		form_id=&#38;#39;$form_id&#38;#39;
		order by
				element_position asc&#38;quot;;
$result = do_query($query);

while($row = do_fetch_result($result)){
		$element_id  = $row[&#38;#39;element_id&#38;#39;];
		$total_child = $row[&#38;#39;element_total_child&#38;#39;];

		if($total_child &#38;gt; 0){

			$max = $total_child + 1;
			for($i=0;$i&#38;lt;=$max;$i++){
				if($i == 0){
					if(array_key_exists(&#38;#39;element_&#38;#39;.$element_id,$table_data)){
						$temp_table_data[&#38;#39;element_&#38;#39;.$element_id] = $table_data[&#38;#39;element_&#38;#39;.$element_id];
					}
				}else{

					if(array_key_exists(&#38;#39;element_&#38;#39;.$element_id.&#38;#39;_&#38;#39;.$i,$table_data)){
						$temp_table_data[&#38;#39;element_&#38;#39;.$element_id.&#38;#39;_&#38;#39;.$i] = $table_data[&#38;#39;element_&#38;#39;.$element_id.&#38;#39;_&#38;#39;.$i];
					}
				}
			}
		}else{
			$temp_table_data[&#38;#39;element_&#38;#39;.$element_id] = $table_data[&#38;#39;element_&#38;#39;.$element_id];
		}
	}

$table_data = array();
$table_data = $temp_table_data;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;code&#62;&#60;/code&#62;&#60;br /&#62;
That should fix the bug.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Order of answers in email"</title>
<link>https://www.machform.com/forums/topic/order-of-answers-in-email#post-103</link>
<pubDate>Tue, 16 Oct 2007 17:38:16 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">103@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Matthew,&#60;/p&#62;
&#60;p&#62;You are right, this is indeed a known bug.&#60;br /&#62;
Other users also reporting this. I'll fix it for the next version.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>matthewbowdengmailcom on "Order of answers in email"</title>
<link>https://www.machform.com/forums/topic/order-of-answers-in-email#post-102</link>
<pubDate>Tue, 16 Oct 2007 15:59:24 +0000</pubDate>
<dc:creator>matthewbowdengmailcom</dc:creator>
<guid isPermaLink="false">102@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I built a form with 10 questions, the resulting email contained 10 answers - all in the correct order.&#60;/p&#62;
&#60;p&#62;However I added in an 11th question in position 2 of the form (not at the end of the form) and tested again. The resulting email added the answer after the other answers, not in position 2.&#60;/p&#62;
&#60;p&#62;I understand why this is happening (because the question was added last it is simply appended to the list of answers) but this will need to be fixed.&#60;/p&#62;
&#60;p&#62;Thanks again for a great app!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
