<?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: Getting selected values of checkboxes in gform_pre_submission</title>
		<link>https://legacy.forums.gravityhelp.com/topic/getting-selected-values-of-checkboxes-in-gform_pre_submission</link>
		<description>Gravity Support Forums Topic: Getting selected values of checkboxes in gform_pre_submission</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 22:12:18 +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/getting-selected-values-of-checkboxes-in-gform_pre_submission" rel="self" type="application/rss+xml" />

		<item>
			<title>Alex Cancado on "Getting selected values of checkboxes in gform_pre_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-selected-values-of-checkboxes-in-gform_pre_submission#post-293173</link>
			<pubDate>Fri, 31 May 2013 16:48:48 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">293173@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;In the pre submission filter, the entry isn't created yet, so you can get a hold of the submitted values by inspecting the $_POST variables. Each checkbox item will have its own variable. For example, lets say I have a checkbox field whose Field Id is 1 and it has 3 choices, then I would access the value for each like the following:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$value_of_first_checkbox = $_POST[&#38;quot;input_2_1&#38;quot;];
$value_of_second_checkbox = $_POST[&#38;quot;input_2_2&#38;quot;];
$value_of_third_checkbox = $_POST[&#38;quot;input_2_3&#38;quot;];&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I hope this helps.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hey.com.uy on "Getting selected values of checkboxes in gform_pre_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-selected-values-of-checkboxes-in-gform_pre_submission#post-289547</link>
			<pubDate>Thu, 30 May 2013 10:42:26 +0000</pubDate>
			<dc:creator>hey.com.uy</dc:creator>
			<guid isPermaLink="false">289547@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Same looking over here!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sciamannikoo on "Getting selected values of checkboxes in gform_pre_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-selected-values-of-checkboxes-in-gform_pre_submission#post-82835</link>
			<pubDate>Tue, 23 Oct 2012 03:09:49 +0000</pubDate>
			<dc:creator>sciamannikoo</dc:creator>
			<guid isPermaLink="false">82835@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you for your reply sanz.&#60;/p&#62;
&#60;p&#62;I wonder why nobody from GF answered yet...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sanz on "Getting selected values of checkboxes in gform_pre_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-selected-values-of-checkboxes-in-gform_pre_submission#post-82826</link>
			<pubDate>Tue, 23 Oct 2012 01:30:59 +0000</pubDate>
			<dc:creator>sanz</dc:creator>
			<guid isPermaLink="false">82826@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;No not as yet ... I've put my project on hold at the moment. Will keep searching for a solution.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sciamannikoo on "Getting selected values of checkboxes in gform_pre_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-selected-values-of-checkboxes-in-gform_pre_submission#post-82689</link>
			<pubDate>Mon, 22 Oct 2012 13:15:08 +0000</pubDate>
			<dc:creator>sciamannikoo</dc:creator>
			<guid isPermaLink="false">82689@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Did you ever find a solution to your issue?&#60;br /&#62;
I'm facing the same problem.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sanz on "Getting selected values of checkboxes in gform_pre_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-selected-values-of-checkboxes-in-gform_pre_submission#post-53245</link>
			<pubDate>Fri, 23 Mar 2012 02:11:57 +0000</pubDate>
			<dc:creator>sanz</dc:creator>
			<guid isPermaLink="false">53245@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey all ... trying to get the checkbox selected values in the gform_pre_submission filter.&#60;/p&#62;
&#60;p&#62;My checkbox field ID is 8.&#60;/p&#62;
&#60;p&#62;I am looping through the $form['fields'] to isolate just the data in the checkboxes in field 8 like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;foreach($form[&#38;#39;fields&#38;#39;] as &#38;amp;$field) {
	    if($field[&#38;#39;id&#38;#39;] === 8) {
	    	$selectData[&#38;#39;inputs&#38;#39;] = $field[&#38;#39;inputs&#38;#39;];
	    	$selectData[&#38;#39;selections&#38;#39;] = $field[&#38;#39;choices&#38;#39;];
	    }
	}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;$selectData gives me all data like:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;Array
(
    [inputs] =&#38;gt; Array
        (
            [0] =&#38;gt; Array
                (
                    [label] =&#38;gt; Appliances
                    [id] =&#38;gt; 8.1
                )

            [1] =&#38;gt; Array
                (
                    [label] =&#38;gt; Book Stores and Stationary
                    [id] =&#38;gt; 8.2
                )

            [2] =&#38;gt; Array
                (
                    [label] =&#38;gt; Fashion and Accessories
                    [id] =&#38;gt; 8.3
                )

            [3] =&#38;gt; Array
                (
                    [label] =&#38;gt; Food and Beverage
                    [id] =&#38;gt; 8.4
                )

            [4] =&#38;gt; Array
                (
                    [label] =&#38;gt; Home and Living
                    [id] =&#38;gt; 8.5
                )

            [5] =&#38;gt; Array
                (
                    [label] =&#38;gt; Technology
                    [id] =&#38;gt; 8.6
                )

        )

    [selections] =&#38;gt; Array
        (
            [0] =&#38;gt; Array
                (
                    [text] =&#38;gt; Appliances
                    [value] =&#38;gt; 9
                    [isSelected] =&#38;gt;
                )

            [1] =&#38;gt; Array
                (
                    [text] =&#38;gt; Book Stores and Stationary
                    [value] =&#38;gt; 10
                    [isSelected] =&#38;gt;
                )

            [2] =&#38;gt; Array
                (
                    [text] =&#38;gt; Fashion and Accessories
                    [value] =&#38;gt; 8
                    [isSelected] =&#38;gt;
                )

            [3] =&#38;gt; Array
                (
                    [text] =&#38;gt; Food and Beverage
                    [value] =&#38;gt; 6
                    [isSelected] =&#38;gt;
                )

            [4] =&#38;gt; Array
                (
                    [text] =&#38;gt; Home and Living
                    [value] =&#38;gt; 7
                    [isSelected] =&#38;gt;
                )

            [5] =&#38;gt; Array
                (
                    [text] =&#38;gt; Technology
                    [value] =&#38;gt; 15
                    [isSelected] =&#38;gt;
                )

        )

)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;However in the [selections] array I'm expecting the [isSelected] value to be set to something but it isn't. In the example above the form was submitted with Appliances, Food and Beverage and Home and Living preselected (checked) in the form and then Book Stores and Stationary checked manually.&#60;/p&#62;
&#60;p&#62;What am I missing? The gform_pre_submission filter should have access to all submitted form data shouldn't it?&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
