<?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: Single checkbox result not exported</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Single checkbox result not exported</description>
<language>en</language>
<pubDate>Wed, 06 May 2026 04:33:41 +0000</pubDate>

<item>
<title>yuniar on "Single checkbox result not exported"</title>
<link>https://www.machform.com/forums/topic/single-checkbox-result-not-exported#post-490</link>
<pubDate>Mon, 31 Dec 2007 15:25:00 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">490@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;No problem! :-)
&#60;/p&#62;</description>
</item>
<item>
<title>villah on "Single checkbox result not exported"</title>
<link>https://www.machform.com/forums/topic/single-checkbox-result-not-exported#post-489</link>
<pubDate>Mon, 31 Dec 2007 15:17:49 +0000</pubDate>
<dc:creator>villah</dc:creator>
<guid isPermaLink="false">489@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Like a charm! Thanks!&#60;/p&#62;
&#60;p&#62;Hans
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Single checkbox result not exported"</title>
<link>https://www.machform.com/forums/topic/single-checkbox-result-not-exported#post-487</link>
<pubDate>Mon, 31 Dec 2007 11:46:44 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">487@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Oh, I think you just found a small bug for that one.&#60;/p&#62;
&#60;p&#62;Here is how to fix it, edit your &#60;strong&#62;export_entries.php&#60;/strong&#62; file, look around line 193 - 227.&#60;br /&#62;
You will find this block of code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//first, reorder columns into the correct position
    $query = &#38;quot;select
    				element_id,
    				element_total_child
    			from
    				ap_form_elements
    		   where
    		   		form_id=&#38;#39;$form_id&#38;#39; and element_type != &#38;#39;section&#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(in_array(&#38;#39;element_&#38;#39;.$element_id,$columns)){
						$temp_columns[] = &#38;#39;element_&#38;#39;.$element_id;
					}
				}else{

					if(in_array(&#38;#39;element_&#38;#39;.$element_id.&#38;#39;_&#38;#39;.$i,$columns)){
						$temp_columns[] = &#38;#39;element_&#38;#39;.$element_id.&#38;#39;_&#38;#39;.$i;
					}
				}
			}
		}else{
			$temp_columns[] = &#38;#39;element_&#38;#39;.$element_id;
		}
	}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;code&#62;&#60;/code&#62;&#60;br /&#62;
Replace that block with this one:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//first, reorder columns into the correct position
    $query = &#38;quot;select
    				element_id,
    				element_total_child,
    				element_type
    			from
    				ap_form_elements
    		   where
    		   		form_id=&#38;#39;$form_id&#38;#39; and element_type != &#38;#39;section&#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;];
		$element_type = $row[&#38;#39;element_type&#38;#39;];

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

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

					if(in_array(&#38;#39;element_&#38;#39;.$element_id.&#38;#39;_&#38;#39;.$i,$columns)){
						$temp_columns[] = &#38;#39;element_&#38;#39;.$element_id.&#38;#39;_&#38;#39;.$i;
					}
				}
			}
		}else{

			if($element_type != &#38;#39;checkbox&#38;#39;){
				$temp_columns[] = &#38;#39;element_&#38;#39;.$element_id;
			}else{
				$temp_columns[] = &#38;#39;element_&#38;#39;.$element_id.&#38;#39;_1&#38;#39;;
			}
		}
	}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;code&#62;&#60;/code&#62;&#60;br /&#62;
If you have any difficulty with the code, let me know. I'll send you the file directly.&#60;br /&#62;
Thanks for reporting this, I'll update the package with the bugfix.
&#60;/p&#62;</description>
</item>
<item>
<title>villah on "Single checkbox result not exported"</title>
<link>https://www.machform.com/forums/topic/single-checkbox-result-not-exported#post-483</link>
<pubDate>Mon, 31 Dec 2007 00:49:52 +0000</pubDate>
<dc:creator>villah</dc:creator>
<guid isPermaLink="false">483@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I am using the checkbox option to create a 'Subscribe me to your newsletter' option at the end of the form. This shows up fine in the backend, but when you export it to XLS/CSV it doesn't show..&#60;/p&#62;
&#60;p&#62;Hans
&#60;/p&#62;</description>
</item>

</channel>
</rss>
