<?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: Calculation Fields and Price Change Based on Field Inputs</title>
		<link>https://legacy.forums.gravityhelp.com/topic/calculation-fields-and-price-change-based-on-field-inputs</link>
		<description>Gravity Support Forums Topic: Calculation Fields and Price Change Based on Field Inputs</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 05:14:03 +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/calculation-fields-and-price-change-based-on-field-inputs" rel="self" type="application/rss+xml" />

		<item>
			<title>relish on "Calculation Fields and Price Change Based on Field Inputs"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculation-fields-and-price-change-based-on-field-inputs#post-60423</link>
			<pubDate>Fri, 25 May 2012 16:15:28 +0000</pubDate>
			<dc:creator>relish</dc:creator>
			<guid isPermaLink="false">60423@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ah so it looks like a plugin I have installed is interfering with how this works. The plugin is &#60;a href=&#34;http://www.pedrolamas.com/projectos/jquery-lightbox-en/&#34; rel=&#34;nofollow&#34;&#62;http://www.pedrolamas.com/projectos/jquery-lightbox-en/&#60;/a&#62;. After deactivating it, the form appears and is working fine. Thanks for checking out my form.&#60;/p&#62;
&#60;p&#62;For the other things, is it possible to enter in if/switch statements in the formula area? I would like to make the price dependent on the admission type (Regular or Student) and the attendance (single day or full conference).  Also, I would like to add in price breaks for full day regular admissions based on the quantity requested. For example:&#60;br /&#62;
 - 1 - 4 People = $300 / person&#60;br /&#62;
 - 5 - 19 People = $275 / person&#60;br /&#62;
 - 20+ People = $225 / person&#60;/p&#62;
&#60;p&#62;Any ideas on how I can accomplish this?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Calculation Fields and Price Change Based on Field Inputs"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculation-fields-and-price-change-based-on-field-inputs#post-60410</link>
			<pubDate>Fri, 25 May 2012 14:45:01 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">60410@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is what the form looks like from that XML in the pastie above: &#60;a href=&#34;http://www.evernote.com/shard/s212/sh/9a4fc2cb-28f3-489d-9284-9f22de959a04/557f15ae328645d7393ba768648ebfc5&#34; rel=&#34;nofollow&#34;&#62;Screenshot&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Is this what you are seeing on load or are you getting display:none still?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>relish on "Calculation Fields and Price Change Based on Field Inputs"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculation-fields-and-price-change-based-on-field-inputs#post-60408</link>
			<pubDate>Fri, 25 May 2012 14:13:53 +0000</pubDate>
			<dc:creator>relish</dc:creator>
			<guid isPermaLink="false">60408@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Rob,&#60;br /&#62;
Thanks for the quick reply.  I've just checked it in the formbuilder preview and the results are the same: JS error and display set to none.&#60;/p&#62;
&#60;p&#62;The situation gets weirder. I've created a simple form with a dropdown field named Drop with Label=&#38;gt;Values of:&#60;br /&#62;
First=&#38;gt;10, Second=&#38;gt;20, and Third=&#38;gt;30&#60;/p&#62;
&#60;p&#62;Then added a product field with the formula {Drop:1} and it works as expected!&#60;/p&#62;
&#60;p&#62;I then recreated my other form from scratch and the problem exists on that form too. I have a few dynamically populated fields and some conditional logic on some other fields.  Please take a look at the XML export of the form here: &#60;a href=&#34;http://www.pastie.org/3967375&#34; rel=&#34;nofollow&#34;&#62;http://www.pastie.org/3967375&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The filters used to populate the dynamic values can be found here: &#60;a href=&#34;http://www.pastie.org/3967402&#34; rel=&#34;nofollow&#34;&#62;http://www.pastie.org/3967402&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks for your help on this issue.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Rob Harrell on "Calculation Fields and Price Change Based on Field Inputs"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculation-fields-and-price-change-based-on-field-inputs#post-60406</link>
			<pubDate>Fri, 25 May 2012 13:30:16 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">60406@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Does the form in question show and work in the formbuilder preview?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>relish on "Calculation Fields and Price Change Based on Field Inputs"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/calculation-fields-and-price-change-based-on-field-inputs#post-60401</link>
			<pubDate>Fri, 25 May 2012 12:19:14 +0000</pubDate>
			<dc:creator>relish</dc:creator>
			<guid isPermaLink="false">60401@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I am trying to create a form that allows users to register for a conference.  The user is able to select an admission rate (Regular or Student) and an attendance date (a specific day or the entire conference).  A different price should be applied depending on what is selected. Also, if the regular rate is selected, I would like to have price breaks at different quantity ranges.&#60;/p&#62;
&#60;p&#62;Here's where I run into problems using the calculation field type for the price field.  Any calculation I enter in here results in a JS error on the post the form is displayed on.  The form is also hidden on that post page.  The markup is all there, but the div containing the form has the attribute style=&#34;display:none;&#34;.  If I remove the calculation, the JS error is gone and the form appears again.&#60;/p&#62;
&#60;p&#62;The JS error I am getting is:&#60;br /&#62;
&#60;code&#62;expr is undefined    expr = expr.replace(matches[i][0], value);    gravityforms.js?ver=1.6.4.4.2 (line 838)&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I have a dropdown field named Admission with two choices and the Label=&#38;gt;Values are:&#60;br /&#62;
Regular=&#38;gt;100 and Student=&#38;gt;55.&#60;/p&#62;
&#60;p&#62;In the product field I have tried the following calculations just for testing and they all give the same JS error:&#60;br /&#62;
 - {Admission:7}&#60;br /&#62;
 - {Admission:7} * 1&#60;br /&#62;
 - something simple like 1 + 1&#60;/p&#62;
&#60;p&#62;I am using v1.6.4.4.2 on WP v3.3.2.&#60;/p&#62;
&#60;p&#62;Am I doing something wrong? Is there a specific syntax for the calculations? Is it possible to put if/switch logic in there? If not, any ideas on how I can accomplish the business logic described above?&#60;/p&#62;
&#60;p&#62;Any help would be greatly appreciated.&#60;/p&#62;
&#60;p&#62;Thank you for your time.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
