<?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: Using checkbox to select a single quantity of each product.</title>
		<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product</link>
		<description>Gravity Support Forums Topic: Using checkbox to select a single quantity of each product.</description>
		<language>en-US</language>
		<pubDate>Wed, 15 Apr 2026 05:22:04 +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/using-checkbox-to-select-a-single-quantity-of-each-product" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-174529</link>
			<pubDate>Sun, 17 Mar 2013 19:01:25 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">174529@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sounds like you have found a work around for now (turning off AJAX)?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mjdigital on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-172497</link>
			<pubDate>Fri, 15 Mar 2013 14:18:28 +0000</pubDate>
			<dc:creator>mjdigital</dc:creator>
			<guid isPermaLink="false">172497@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Just to update you - I still cannot get the code to work when going back/forth in a multi-page form with AJAX on so I turned AJAX off and it works now (obviously the pre_render filter runs each time now). I don't need it to be AJAX enabled for this project (in fact it makes my life even easier as I can now access and display the $_POST variables between pages) so I think I can carry on as normal now but it may be nice in the future to have the ability to use a pre_render style hook for each page of a multi-page form using AJAX.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mjdigital on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-171355</link>
			<pubDate>Thu, 14 Mar 2013 14:08:18 +0000</pubDate>
			<dc:creator>mjdigital</dc:creator>
			<guid isPermaLink="false">171355@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Chris&#60;/p&#62;
&#60;p&#62;    I have found that my solution does not work when going back a page in a multi-page form. I have tried adding the same function to the gform_post_paging action hook but it does not seem to work and the checkboxes have reverted back to their original, pre-replaced state.&#60;/p&#62;
&#60;p&#62;I originally thought it was because the fields are already rendered and just shown via JavaScript but if I add a function with an exit() statement to the gform_post_paging hook then the next page does not load at all so there must be some server side processing going on?&#60;/p&#62;
&#60;p&#62;Any ideas? If not then I will need to write a JavaScript equivalent but that's a bit of a long hacky way round.&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-170536</link>
			<pubDate>Wed, 13 Mar 2013 22:54:16 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">170536@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for sharing your solution.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mjdigital on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-168597</link>
			<pubDate>Tue, 12 Mar 2013 04:32:01 +0000</pubDate>
			<dc:creator>mjdigital</dc:creator>
			<guid isPermaLink="false">168597@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Chris&#60;/p&#62;
&#60;p&#62;    Thanks for the reply, in the end I bit the bullet and coded it in using the pre_render hook. Basically I set the dynamic variable name as the checkbox value and leave the price blank then to make the field dynamic I set the field class name to &#34;dynamic_options&#34; and save it.&#60;/p&#62;
&#60;p&#62;Then in my functions file the code: &#60;a href=&#34;http://pastebin.com/2BXy9CS7&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/2BXy9CS7&#60;/a&#62; basically looks for any field with the dynamic_options class and loops through each option looking for a $_GET variable with the same parameter/variable name as the option value, if it finds one then it sets the price for that option to be the value of the $_GET variable and changes the option value to use the option text so the field is more obvious to the end user once submitted. (just for your info I actually set the $_GET variables directly in PHP rather than passing them via the URL - so something like $_GET['optional_extra_price'] = 'very expensive!'; )&#60;/p&#62;
&#60;p&#62;It's a bit of a dirty hack and I'm still in testing for this code but so far it seems to work nicely.&#60;/p&#62;
&#60;p&#62;Thanks again for the reply&#60;/p&#62;
&#60;p&#62;MJ
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-168471</link>
			<pubDate>Tue, 12 Mar 2013 01:51:10 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">168471@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I can help you with dynamically checking a box.  Can you link to your form and explain what you're trying to do?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mjdigital on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-164393</link>
			<pubDate>Fri, 08 Mar 2013 08:34:22 +0000</pubDate>
			<dc:creator>mjdigital</dc:creator>
			<guid isPermaLink="false">164393@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Chris or Lee&#60;/p&#62;
&#60;p&#62;Did this ever get resolved? I am looking for the same kind of thing in that I have dynamically populated simple products that I want a single checkbox to add to the total (they are optional extras with prices calculated by PHP and the extra cost is made available in hooks).&#60;/p&#62;
&#60;p&#62;Ideally I'd like to add checkboxes and dynamically populate their values but that doesn't seem to be easily achievable either.&#60;/p&#62;
&#60;p&#62;Thanks&#60;/p&#62;
&#60;p&#62;MJ
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-145164</link>
			<pubDate>Sat, 09 Feb 2013 12:17:09 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">145164@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you export that form (go to Forms &#38;gt; Import/Export then the top center menu item &#34;Export Forms&#34;) and email the XML file to &#60;a href=&#34;mailto:chris@rocketgenius.com&#34;&#62;chris@rocketgenius.com&#60;/a&#62; ?  I would like to install your form and see if I can make it work with a checkbox.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>honeyl on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-145130</link>
			<pubDate>Sat, 09 Feb 2013 10:39:46 +0000</pubDate>
			<dc:creator>honeyl</dc:creator>
			<guid isPermaLink="false">145130@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Chris,&#60;/p&#62;
&#60;p&#62;The site's still under development, so I don't have a publicly accessible URL, but here's a screenshot showing what I'm talking about. When I mentioned that users need only one, I meant the product quantity is only one, but there are several different workshops (products) to select on the page. Disregard the instructions on the form, as we decided to allow only one person to sign up at a time. Essentially, I want to replace the &#34;No. of Students&#34; field with a simple checkbox that registers a product quantity of one when totalling the account.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://grab.by/jKzq&#34; rel=&#34;nofollow&#34;&#62;http://grab.by/jKzq&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Any help you could provide would be great. Thanks.&#60;/p&#62;
&#60;p&#62;-- Lee
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Using checkbox to select a single quantity of each product."</title>
			<link>https://legacy.forums.gravityhelp.com/topic/using-checkbox-to-select-a-single-quantity-of-each-product#post-145016</link>
			<pubDate>Sat, 09 Feb 2013 02:19:30 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">145016@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Do you have this form online somewhere now so we can see what you have?  You mentioned &#34;user needs to only sign up for one of each&#34; but also &#34;they can select multiple workshops&#34;, so I was a little confused. Maybe there are multiple time slots for the same workshop or something?    If we can see what you have online, maybe we can come up with a solution for you.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
