		<?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>Appnitro Software Forums Topic: Customising Checkbox Value</title>
<link>http://www.appnitro.com/forums/</link>
<description>Appnitro Software Forums Topic: Customising Checkbox Value</description>
<language>en</language>
<pubDate>Tue, 07 Feb 2012 09:46:11 +0000</pubDate>

<item>
<title>yuniar on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4665</link>
<pubDate>Sat, 14 Feb 2009 12:12:08 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">4665@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;much better idea! hehehe
&#60;/p&#62;</description>
</item>
<item>
<title>teamwebb2008 on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4654</link>
<pubDate>Fri, 13 Feb 2009 22:46:15 +0000</pubDate>
<dc:creator>teamwebb2008</dc:creator>
<guid isPermaLink="false">4654@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;I found a way around it.  Since there is no reason to keep this information in the database for the current form, I used idea from another of your posts and went with the following in a section break:  Click &#60;a href=&#34;http://www.tfscnc.org/machform/view.php?id=9&#34;&#62;here&#60;/a&#62; for Team Factory Bridge Program Membership Application&#60;/p&#62;
&#60;p&#62;It works like a charm!!  Thanks anyway.  If I keep this up, can I graduate from your school??  :)
&#60;/p&#62;</description>
</item>
<item>
<title>teamwebb2008 on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4639</link>
<pubDate>Thu, 12 Feb 2009 19:20:58 +0000</pubDate>
<dc:creator>teamwebb2008</dc:creator>
<guid isPermaLink="false">4639@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Correct.  This avoids them filling out a form not needed.  They should be directed to the form requesting that service. (Also a MachForm)
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4629</link>
<pubDate>Thu, 12 Feb 2009 15:14:12 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">4629@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;So if someone select the checkbox, they will be redirected immediately to that URL? Abandoning your current form?
&#60;/p&#62;</description>
</item>
<item>
<title>teamwebb2008 on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4618</link>
<pubDate>Thu, 12 Feb 2009 01:48:06 +0000</pubDate>
<dc:creator>teamwebb2008</dc:creator>
<guid isPermaLink="false">4618@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;What I am trying to do is, if someone selects TFSC checkbox, they will go to that form .....id_9, if not, they can continue the app.
&#60;/p&#62;</description>
</item>
<item>
<title>teamwebb2008 on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4614</link>
<pubDate>Wed, 11 Feb 2009 21:57:12 +0000</pubDate>
<dc:creator>teamwebb2008</dc:creator>
<guid isPermaLink="false">4614@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;I tried to change my checkbox on Yes to go something like this:  &#60;/p&#62;
&#60;p&#62;if($form_id == 2 &#38;#38;&#38;#38; $element_id == 104){&#60;br /&#62;
	$entry_details[$i]['value'] = '&#38;lt;img src=&#34;'.$options['http://www.tfscnc.org/machform/view.php?id=9'].'images/icons/checkbox_16.gif&#34; align=&#34;absmiddle&#34; /&#38;gt; Yes';&#60;br /&#62;
}else{&#60;br /&#62;
	$entry_details[$i]['value'] = rtrim($checkbox_content,'&#60;br /&#62;');&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;But nothing happened.  Did I miss something somewhere?
&#60;/p&#62;</description>
</item>
<item>
<title>vancoovur on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4570</link>
<pubDate>Sat, 07 Feb 2009 00:25:25 +0000</pubDate>
<dc:creator>vancoovur</dc:creator>
<guid isPermaLink="false">4570@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Thanks for your quick reply. It's always appreciated!&#60;br /&#62;
I would like to make this modification global, not just for a single form. In other words, I would like any check boxes that are selected within a form to enter the 'Yes' value. Is this possible?
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4565</link>
<pubDate>Fri, 06 Feb 2009 22:48:36 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">4565@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Try to edit your &#34;export_entries.php&#34;, around line 304~307 you'll find these code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(!empty($row[$column_name])){
	$form_data[$i][$j]  			= $column_label[$j];
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;replace with this one &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(!empty($row[$column_name])){
	if ($column_name == &#38;#39;element_1_1&#38;#39; &#38;#38;&#38;#38; $form_id == 11)
		$form_data[$i][$j]  			= &#38;#39;Yes&#38;#39;;
	else
		$form_data[$i][$j]  			= $column_label[$j];
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;when you export the entries, you can see that &#34;element_1&#34; check box will have column header name &#34;I subscribe...&#34; with value &#34;Yes&#34; if checked.&#60;br /&#62;
Don't forget to make sure you have adjust the element id and form id with yours.
&#60;/p&#62;</description>
</item>
<item>
<title>vancoovur on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4552</link>
<pubDate>Fri, 06 Feb 2009 06:16:26 +0000</pubDate>
<dc:creator>vancoovur</dc:creator>
<guid isPermaLink="false">4552@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;I retract the above post as it *did* work but...&#60;br /&#62;
I have a form with a number of single checkboxes with no field label and the 'choice' text is 'I subscribe to your magazine'. If the box is checked I need the exported data (Excel document) to contain a column header that reads 'I subscribe to your magazine' and a 'Yes' in the corresponding data field. If the checkbox is not selected the data field within the 'I subscribe to your magazine' column will be empty. Can this be done or is there a better way to accomplish this?
&#60;/p&#62;</description>
</item>
<item>
<title>vancoovur on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-4551</link>
<pubDate>Fri, 06 Feb 2009 05:30:22 +0000</pubDate>
<dc:creator>vancoovur</dc:creator>
<guid isPermaLink="false">4551@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;This one doesn't work for me. I made the changes to manage_entries.php as per your instructions above, created a test form with a single check box and viewed the results within MachForm and by exporting the data to Excel. Both retained the 'First Option' field description rather than replacing with 'Yes'. Has something changed since this was posted 9 months ago?&#60;br /&#62;
Thanks Yuniar
&#60;/p&#62;</description>
</item>
<item>
<title>philwareham on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-1735</link>
<pubDate>Fri, 09 May 2008 15:46:05 +0000</pubDate>
<dc:creator>philwareham</dc:creator>
<guid isPermaLink="false">1735@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;That works beautifully (I just amended the 'Yes' in row 3 to 'Receive Newsletters?' though), thanks for the continued support yuniar.&#60;br /&#62;
This software is great.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-1727</link>
<pubDate>Fri, 09 May 2008 14:17:32 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">1727@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Oh.. I see.&#60;/p&#62;
&#60;p&#62;Try this, edit your manage_entries.php, search around line 180 -183:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;foreach ($this_checkbox_options as $option_id=&#38;gt;$option){
	$column_name_lookup[&#38;#39;element_&#38;#39;.$row[&#38;#39;element_id&#38;#39;].&#38;#39;_&#38;#39;.$option_id] = $option;
	$column_type_lookup[&#38;#39;element_&#38;#39;.$row[&#38;#39;element_id&#38;#39;].&#38;#39;_&#38;#39;.$option_id] = $row[&#38;#39;element_type&#38;#39;];
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;code&#62;&#60;/code&#62;&#60;br /&#62;
replace it with this one:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;foreach ($this_checkbox_options as $option_id=&#38;gt;$option){
	if($form_id == 1 &#38;#38;&#38;#38; $row[&#38;#39;element_id&#38;#39;] == 11){
		$column_name_lookup[&#38;#39;element_&#38;#39;.$row[&#38;#39;element_id&#38;#39;].&#38;#39;_&#38;#39;.$option_id] = &#38;#39;Yes&#38;#39;;
	}else{
		$column_name_lookup[&#38;#39;element_&#38;#39;.$row[&#38;#39;element_id&#38;#39;].&#38;#39;_&#38;#39;.$option_id] = $option;
	}
	$column_type_lookup[&#38;#39;element_&#38;#39;.$row[&#38;#39;element_id&#38;#39;].&#38;#39;_&#38;#39;.$option_id] = $row[&#38;#39;element_type&#38;#39;];
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;code&#62;&#60;/code&#62;&#60;br /&#62;
let me know how it goes.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;/code&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>philwareham on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-1702</link>
<pubDate>Thu, 08 May 2008 16:19:15 +0000</pubDate>
<dc:creator>philwareham</dc:creator>
<guid isPermaLink="false">1702@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi yuniar,&#60;/p&#62;
&#60;p&#62;Thanks for that, but I think my original message was a bit unclear... Basically for a field with just a single checkbox, I want the entries database column heading to use the description text not the label text. Can this be done?&#60;/p&#62;
&#60;p&#62;Also, do you think it would be a good idea to have a separate forum section for machform hacks so people can find them easily? I'm sure some will be interested in things like, for example, the option to have spaces and dashes in international telephone numbers, which you provided in an earlier post.&#60;/p&#62;
&#60;p&#62;Cheers, Phil
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-1701</link>
<pubDate>Thu, 08 May 2008 15:12:33 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">1701@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Do you mean to show 'Yes' when you view it through view_entry.php ?&#60;/p&#62;
&#60;p&#62;If so, edit your &#60;strong&#62;includes/entry-functions.php&#60;/strong&#62; file.&#60;br /&#62;
Search around line 375, you'll find this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(!empty($checkbox_content)){
	$entry_details[$i][&#38;#39;value&#38;#39;] = rtrim($checkbox_content,&#38;#39;&#38;lt;br /&#38;gt;&#38;#39;);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;code&#62;&#60;/code&#62;&#60;br /&#62;
Replace it with this one:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($form_id == 1 &#38;#38;&#38;#38; $element_id == 11){
	$entry_details[$i][&#38;#39;value&#38;#39;] = &#38;#39;&#38;lt;img src=&#38;quot;&#38;#39;.$options[&#38;#39;machform_path&#38;#39;].&#38;#39;images/icons/checkbox_16.gif&#38;quot; align=&#38;quot;absmiddle&#38;quot; /&#38;gt; Yes&#38;#39;;
}else{
	$entry_details[$i][&#38;#39;value&#38;#39;] = rtrim($checkbox_content,&#38;#39;&#38;lt;br /&#38;gt;&#38;#39;);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;code&#62;&#60;/code&#62;&#60;br /&#62;
That should do it.
&#60;/p&#62;</description>
</item>
<item>
<title>philwareham on "Customising Checkbox Value"</title>
<link>http://www.appnitro.com/forums/topic/customising-checkbox-value#post-1672</link>
<pubDate>Wed, 07 May 2008 15:51:42 +0000</pubDate>
<dc:creator>philwareham</dc:creator>
<guid isPermaLink="false">1672@http://www.appnitro.com/forums/</guid>
<description>&#60;p&#62;Hi there,&#60;br /&#62;
On one of my forms, there is a single checkbox (for reference it is element_11_1 on form_1) that allows form senders to opt in to a newsletter. At the moment the label for that checkbox is a long disclaimer text (which I filled in on the choices field when creating the form), and that whole text is then included in the database if the user checks the box.&#60;br /&#62;
Is there a way I can customise the value of the checkbox so it simply states 'yes' in the database, not the whole label text?&#60;br /&#62;
Thanks,&#60;br /&#62;
Phil
&#60;/p&#62;</description>
</item>

</channel>
</rss>

