<?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: Grabbing value of a checkbox during validation?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/grabbing-value-of-a-checkbox-during-validation</link>
		<description>Gravity Support Forums Topic: Grabbing value of a checkbox during validation?</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 23:49:11 +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/grabbing-value-of-a-checkbox-during-validation" rel="self" type="application/rss+xml" />

		<item>
			<title>phase00 on "Grabbing value of a checkbox during validation?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/grabbing-value-of-a-checkbox-during-validation#post-60903</link>
			<pubDate>Wed, 30 May 2012 21:18:59 +0000</pubDate>
			<dc:creator>phase00</dc:creator>
			<guid isPermaLink="false">60903@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi there, I'm attempting to use gform_validation on a pretty convoluted form (by design). It all seems to be going well except for one part.&#60;/p&#62;
&#60;p&#62;The general logic of what I'm attempting to validate is the amount of emails that can be supplied for a given quantity. For example, if a value of 5 is picked, the user can &#34;opt-in&#34; allowing only 4 emails to be added to a text area. So far my validation works for not enough emails, too many emails, and just enough emails supplied. I however cannot figure out for life of me how to grab the value of a check-box during a validation hook in order to subtract it from the quantity value.&#60;/p&#62;
&#60;p&#62;Here is a look at my code : &#60;a href=&#34;http://pastie.org/3998833&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/3998833&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;Basically, rgpost(&#34;input_3&#34;) is the quantity set. I pass that through to something strips whitespace, explodes emails and validates them, then checks to see if the number of emails supplied matches quantity. &#60;/p&#62;
&#60;p&#62;What I would like to be able to do is grab &#34;Content-Disposition: form-data; name=&#34;input_4.1&#34; online_self&#34;, check if it is in fact set to &#34;online_self&#34; and if it is, subtract one from the total amount of emails. &#60;/p&#62;
&#60;p&#62;Whenever I try to rgpost the input, everything breaks (I get php errors). Maybe I'm using the wrong way to call the input?&#60;/p&#62;
&#60;p&#62;If anyone can point me in the right direction, it would be much appreciated.&#60;/p&#62;
&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;As part of my validation, I need to check to see if an input is checked or not. If it is, I need to subtract 1 from a number (namely the maximum quantity).
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
