<?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: Dynamic Price Per Square-Metre Calculation</title>
		<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation</link>
		<description>Gravity Support Forums Topic: Dynamic Price Per Square-Metre Calculation</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 01:47:34 +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/dynamic-price-per-square-metre-calculation" rel="self" type="application/rss+xml" />

		<item>
			<title>David Smith on "Dynamic Price Per Square-Metre Calculation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation#post-19770</link>
			<pubDate>Wed, 02 Mar 2011 17:32:41 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">19770@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi comparetor, this would go in your functions.php file. Make sure you following the additional setup instructions on my first post of this thread:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/dynamic-price-per-square-metre-calculation#post-16714&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/dynamic-price-per-square-metre-calculation#post-16714&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>comparetor on "Dynamic Price Per Square-Metre Calculation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation#post-19746</link>
			<pubDate>Wed, 02 Mar 2011 13:46:45 +0000</pubDate>
			<dc:creator>comparetor</dc:creator>
			<guid isPermaLink="false">19746@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Perfect! This is exactly what I need, but I'm not sure what file this code needs to be added to. I know this is outside the realm of &#34;standard&#34; support, but this is incredibly helpful! Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mrhoneyfoot on "Dynamic Price Per Square-Metre Calculation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation#post-16864</link>
			<pubDate>Sat, 22 Jan 2011 16:33:12 +0000</pubDate>
			<dc:creator>mrhoneyfoot</dc:creator>
			<guid isPermaLink="false">16864@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;WORKS..! Thanks David Smith. You made my day. Much appreciated.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Dynamic Price Per Square-Metre Calculation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation#post-16857</link>
			<pubDate>Sat, 22 Jan 2011 11:10:21 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">16857@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The total field is a &#34;just for show&#34; field. You can manipulate the total field with javascript all you want, but the submitted value is not used to determine the &#34;real&#34; total of the submission. That is why we use the product field set to user defined price. The value submitted through this field does impact the &#34;real&#34; total of the submission. So, with that said, here is an updated snippet that still uses the user defined price, but hides it with a little CSS, but also uses the total field to provide that information to the user.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastie.org/1487231&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1487231&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mrhoneyfoot on "Dynamic Price Per Square-Metre Calculation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation#post-16844</link>
			<pubDate>Sat, 22 Jan 2011 08:01:28 +0000</pubDate>
			<dc:creator>mrhoneyfoot</dc:creator>
			<guid isPermaLink="false">16844@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Well that didn't work. Two more functions might be causing this. Either this one:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function gformIsHidden(element){
    return element.parents(&#38;#39;.gfield&#38;#39;).css(&#38;quot;display&#38;quot;) == &#38;quot;none&#38;quot;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;or this part of the function gformCalculateProductPrice(formId, productFieldId){&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(!gformIsHidden(jQuery(this)))
            price += gformGetPrice(jQuery(this).val());
    });&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Alternatively &#60;code&#62;price = productField.val();&#60;/code&#62; was not the answer. Anyone want to make a call?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mrhoneyfoot on "Dynamic Price Per Square-Metre Calculation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation#post-16842</link>
			<pubDate>Sat, 22 Jan 2011 07:37:49 +0000</pubDate>
			<dc:creator>mrhoneyfoot</dc:creator>
			<guid isPermaLink="false">16842@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Think we might have found what's causing total price to remain at zero. &#60;/p&#62;
&#60;p&#62;Specifically, &#60;code&#62;function gformGetBasePrice(formId, productFieldId){&#60;/code&#62; has two almost identical instances of the following inside price.js: &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//If field is hidden by conditional logic, don&#38;#39;t count it for the total
        if(gformIsHidden(productField)){
            price = 0;
        }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//If field is hidden by conditional logic, don&#38;#39;t count it for the total
        if(gformIsHidden(productField))
            price = 0;

    }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Should &#60;code&#62;price = 0;&#60;/code&#62; be changed to &#60;code&#62;price = productField.val();&#60;/code&#62; Will that work?&#60;/p&#62;
&#60;p&#62;I know hacking price.js probably isn't the best solution due to upgrades. Would anyone know if this function can be overridden through functions.php?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mrhoneyfoot on "Dynamic Price Per Square-Metre Calculation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation#post-16784</link>
			<pubDate>Fri, 21 Jan 2011 14:06:31 +0000</pubDate>
			<dc:creator>mrhoneyfoot</dc:creator>
			<guid isPermaLink="false">16784@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;David Smith, I salute you. Really appreciate it mate. Works beautifully. Quick question though.&#60;/p&#62;
&#60;p&#62;A problem with a user defined field is that the user can type over it. Tried hiding the price field with conditional logic, hoping Total Price would step into the breach. However Total Price doesn't pick up the price field when it's hidden. David is there a way to get Total Price to pick up the hidden field? Given that Total Price works through javascript too, is it possible to adapt your snippet?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Dynamic Price Per Square-Metre Calculation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation#post-16714</link>
			<pubDate>Thu, 20 Jan 2011 15:25:33 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">16714@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok... so I got a little carried away here... and I have to throw out the disclaimer that we can't really offer this level of support on every forum request, but here is a really solid start on this. You piqued my interest. :P&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastie.org/1481851&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/1481851&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;There are five pieces of this you'll need to update for your form (there are notes in the code itself):&#60;/p&#62;
&#60;ol&#62;
&#60;li&#62;The ID specified by the hook&#60;/li&#62;
&#60;li&#62;Height Input&#60;/li&#62;
&#60;li&#62;Width Input&#60;/li&#62;
&#60;li&#62;Price Input&#60;/li&#62;
&#60;li&#62;Price Per Meter&#60;/li&#62;
&#60;/ol&#62;
&#60;p&#62;I used number fields for the height and width and a price field set to the &#34;user defined price&#34; option for the price field. Hope this helps and don't tell my bosses. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mrhoneyfoot on "Dynamic Price Per Square-Metre Calculation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-price-per-square-metre-calculation#post-16695</link>
			<pubDate>Thu, 20 Jan 2011 11:54:45 +0000</pubDate>
			<dc:creator>mrhoneyfoot</dc:creator>
			<guid isPermaLink="false">16695@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;My Goal is to allow users to price-up a selected product by entering width and height measurements in millimeters to generate a price. Essentially to calculate price per square metre. Is this possible with gravity forms? Or with PHPurchase and gravity forms? Or has anyone heard of a solution out there?&#60;/p&#62;
&#60;p&#62;Cheers Guys.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
