<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Checkbox default status=selected...bug?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug</link>
		<description>Gravity Support Forums Topic: Checkbox default status=selected...bug?</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:50:00 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/checkbox-default-statusselectedbug" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-69497</link>
			<pubDate>Sat, 04 Aug 2012 10:56:33 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">69497@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Outstanding.  I'm glad you were able to make that work  Congratulations.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ketiga on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-69465</link>
			<pubDate>Sat, 04 Aug 2012 02:36:37 +0000</pubDate>
			<dc:creator>Ketiga</dc:creator>
			<guid isPermaLink="false">69465@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;yes, it's working for each individual set of checkboxes now as well.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-69453</link>
			<pubDate>Fri, 03 Aug 2012 22:31:21 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">69453@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That sounds pretty good.  Is it working for you now?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ketiga on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-69119</link>
			<pubDate>Thu, 02 Aug 2012 08:50:04 +0000</pubDate>
			<dc:creator>Ketiga</dc:creator>
			<guid isPermaLink="false">69119@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok, I think I got it working.&#60;/p&#62;
&#60;p&#62;First I created the select all checkbox with an HTML block as you suggested&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;input type=&#38;quot;checkbox&#38;quot; id=&#38;quot;selectall&#38;quot; value=&#38;quot;Select All&#38;quot; /&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then I used this code in the javascript file&#60;br /&#62;
(change the input numbers so they match your form inputs)&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;var $j = jQuery.noConflict();

$j(document).ready(function(){

    // add multiple select / deselect functionality
    $j(&#38;quot;#selectall&#38;quot;).click(function () {
          $j(&#38;quot;input[name^=&#38;#39;input_3.&#38;#39;]&#38;quot;).attr(&#38;#39;checked&#38;#39;, this.checked);
    })

    // if all checkbox are selected, check the selectall checkbox
    // and viceversa
    $j(&#38;quot;input[name^=&#38;#39;input_3.&#38;#39;]&#38;quot;).click(function(){

        if($j(&#38;quot;input[name^=&#38;#39;input_3.&#38;#39;]&#38;quot;).length == $j(&#38;quot;input[name^=&#38;#39;input_3.&#38;#39;]:checked&#38;quot;).length) {
            $j(&#38;quot;#selectall&#38;quot;).attr(&#38;quot;checked&#38;quot;, &#38;quot;checked&#38;quot;);
        } else {
            $j(&#38;quot;#selectall&#38;quot;).removeAttr(&#38;quot;checked&#38;quot;);
        }

    })
})&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;In the theme funtions.php file I only changed my form number.&#60;/p&#62;
&#60;p&#62;Cheers!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ketiga on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-68726</link>
			<pubDate>Tue, 31 Jul 2012 08:28:21 +0000</pubDate>
			<dc:creator>Ketiga</dc:creator>
			<guid isPermaLink="false">68726@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok, I'm not entirely sure why but using your code with the jquery noconflict stuff :)&#60;br /&#62;
I managed to get it working with HTML:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://ketiga.nl/checkboxes-test/&#34; rel=&#34;nofollow&#34;&#62;http://ketiga.nl/checkboxes-test/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Now I need it to work with form checkboxes instead of a HTML code block.&#60;/p&#62;
&#60;p&#62;Any ideas?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ketiga on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-68723</link>
			<pubDate>Tue, 31 Jul 2012 08:15:51 +0000</pubDate>
			<dc:creator>Ketiga</dc:creator>
			<guid isPermaLink="false">68723@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;While searching Google I found this code:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://viralpatel.net/blogs/multiple-checkbox-select-deselect-jquery-tutorial-example/&#34; rel=&#34;nofollow&#34;&#62;http://viralpatel.net/blogs/multiple-checkbox-select-deselect-jquery-tutorial-example/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;This seems to do exactly what I need, but I can't get it to work with Gravity Forms...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ketiga on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-68712</link>
			<pubDate>Tue, 31 Jul 2012 03:43:43 +0000</pubDate>
			<dc:creator>Ketiga</dc:creator>
			<guid isPermaLink="false">68712@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Or maybe some hidden value that gets passed only in case all boxes are checked would work as well...I need a way to really tell when all boxes are checked. So when I select all but uncheck a couple of boxes, this value should change.&#60;/p&#62;
&#60;p&#62;Hope this makes sense...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ketiga on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-68710</link>
			<pubDate>Tue, 31 Jul 2012 03:32:27 +0000</pubDate>
			<dc:creator>Ketiga</dc:creator>
			<guid isPermaLink="false">68710@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chris,&#60;/p&#62;
&#60;p&#62;Thank you. This worked instantly, great!&#60;br /&#62;
Like you mentioned I need a way to select individual groups of checkboxes. Since I am not familiar with jquery (and I have a little trouble understanding the syntax) can you show me how to do this?&#60;/p&#62;
&#60;p&#62;I also still need to be able to use the built in css classes to devide my boxes for instance into 3 or 4 columns.&#60;/p&#62;
&#60;p&#62;Also, once  you have used the button to select all the boxes, I need a way to toggle the status of the button back from 'unselect all' to 'select all' once you decide to manually uncheck one of the boxes in the group.&#60;/p&#62;
&#60;p&#62;Thanks a lot so far!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-68613</link>
			<pubDate>Mon, 30 Jul 2012 14:51:01 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">68613@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Take a look at this sample form I put up, based on your 20-item list:&#60;br /&#62;
&#60;a href=&#34;http://gravity.chrishajer.com/select-all-with-jquery/&#34; rel=&#34;nofollow&#34;&#62;http://gravity.chrishajer.com/select-all-with-jquery/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I added this HTML block to the form after my list of checkboxes:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[html]
  &#38;lt;input type=&#38;quot;button&#38;quot; class=&#38;quot;check&#38;quot; value=&#38;quot;Select All&#38;quot; /&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That puts a &#34;Select All&#34; button after the checkbox list.&#60;/p&#62;
&#60;p&#62;Then, I created this script to provide the check/uncheck all functionality:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[js]
var $j = jQuery.noConflict();
$j(document).ready(function(){
    $j(&#38;#39;.check:button&#38;#39;).toggle(function(){
        $j(&#38;#39;input:checkbox&#38;#39;).attr(&#38;#39;checked&#38;#39;,&#38;#39;checked&#38;#39;);
        $j(this).val(&#38;#39;Unselect All&#38;#39;)
    },function(){
        $j(&#38;#39;input:checkbox&#38;#39;).removeAttr(&#38;#39;checked&#38;#39;);
        $j(this).val(&#38;#39;Select All&#38;#39;);
    })
})&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That will toggle back and forth between &#34;Select All&#34; and &#34;Unselect All&#34;.  I unchecked the boxes in the form builder by default, and have the button saying &#34;Select All&#34;.&#60;/p&#62;
&#60;p&#62;I saved that script to a file called &#34;select-all.js&#34; in my child theme's &#60;strong&#62;js&#60;/strong&#62; folder.&#60;/p&#62;
&#60;p&#62;To include that script on the page where this form is in use (form 108), I added this to my theme's functions.php:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
add_action(&#38;#39;gform_enqueue_scripts_108&#38;#39;, &#38;#39;enqueue_select_all_script&#38;#39;, 10, 2);
function enqueue_select_all_script($form, $is_ajax) {
        wp_enqueue_script(&#38;#39;select_all_script&#38;#39;, get_stylesheet_directory_uri() . &#38;#39;/js/select-all.js&#38;#39;, array(&#38;#39;jquery&#38;#39;));
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That will load my script on any page with form 108 present, and handles the jQuery dependency.  Change the &#34;108&#34; to your form ID.&#60;/p&#62;
&#60;p&#62;This can be extended if you need, for multiple checkbox lists (right now, it will toggle all check boxes on the form.)  You can give a CSS Class name to individual groups of checkboxes if you have more than one group on a form, then add an individual button after each group, and extend the script to target just the specific group of checkboxes you want.&#60;/p&#62;
&#60;p&#62;Let me know if you have any questions with implementation.  Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Ketiga on "Checkbox default status=selected...bug?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/checkbox-default-statusselectedbug#post-68504</link>
			<pubDate>Mon, 30 Jul 2012 03:43:20 +0000</pubDate>
			<dc:creator>Ketiga</dc:creator>
			<guid isPermaLink="false">68504@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks, but I don't think this issue is related other than something's going wrong with the tenth checkbox :)&#60;/p&#62;
&#60;p&#62;In my case every tenth checkbox loses its default selected state when used in combination with conditional logic.&#60;/p&#62;
&#60;p&#62;I have e-mailed you my export of the form.&#60;/p&#62;
&#60;p&#62;Thanks for helping out!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
