<?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: paypal dynamic options</title>
		<link>https://legacy.forums.gravityhelp.com/topic/paypal-dynamic-options</link>
		<description>Gravity Support Forums Topic: paypal dynamic options</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 10:50:22 +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/paypal-dynamic-options" rel="self" type="application/rss+xml" />

		<item>
			<title>peculiar on "paypal dynamic options"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/paypal-dynamic-options#post-23739</link>
			<pubDate>Wed, 20 Apr 2011 08:40:39 +0000</pubDate>
			<dc:creator>peculiar</dc:creator>
			<guid isPermaLink="false">23739@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you so much for your help... That was exactly my issue. My $field loop was incorrect, adding the type as &#34;product&#34; and the inputType as &#34;select&#34; fixed all the issues I was having. There is no longer the need to us the gform_paypal_query filter.&#60;/p&#62;
&#60;p&#62;I'll paste the code, just in case this helps anyone else in the future.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;foreach($form_meta[&#38;quot;fields&#38;quot;] as &#38;amp;$field) {
			if($field[&#38;quot;id&#38;quot;] == 1)
        		{
           			$field[&#38;quot;type&#38;quot;] = &#38;quot;product&#38;quot;;
           			$field[&#38;quot;inputType&#38;quot;] = &#38;quot;select&#38;quot;;
            		       $field[&#38;quot;choices&#38;quot;] = $items;
            		     //$field[&#38;quot;enablePrice&#38;quot;] = 1;
                         //$field[&#38;quot;basePrice&#38;quot;] = &#38;#39;$0.00&#38;#39;;
				}
			}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Thanks again!!!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "paypal dynamic options"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/paypal-dynamic-options#post-23719</link>
			<pubDate>Tue, 19 Apr 2011 21:15:05 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">23719@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Great! I am glad that worked for you. Is your drop down a product field or a regular drop down field? The Total calculation should get called if you are using a product field. If you don't figure it out, send a link to your form and I will take a look.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>peculiar on "paypal dynamic options"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/paypal-dynamic-options#post-23708</link>
			<pubDate>Tue, 19 Apr 2011 17:04:08 +0000</pubDate>
			<dc:creator>peculiar</dc:creator>
			<guid isPermaLink="false">23708@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Very cool... thank you! It worked, and all I had to do was use the  &#34;gform_paypal_query&#34; filter to update the default query string.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_paypal_query_5&#38;#39;, &#38;#39;update_paypal_query&#38;#39;);
function update_paypal_query($query_string) {
    return  $query_string;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The js for the total field still does not update based on selection ( the js doesn't get called ), but I should hopefully be able to figure that out. &#60;/p&#62;
&#60;p&#62;Thanks again for the help
&#60;/p&#62;</description>
		</item>
		<item>
			<title>peculiar on "paypal dynamic options"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/paypal-dynamic-options#post-23706</link>
			<pubDate>Tue, 19 Apr 2011 16:39:00 +0000</pubDate>
			<dc:creator>peculiar</dc:creator>
			<guid isPermaLink="false">23706@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you very much, I do appreciate it. I will give it a try and let you know my results.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "paypal dynamic options"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/paypal-dynamic-options#post-23704</link>
			<pubDate>Tue, 19 Apr 2011 16:23:06 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">23704@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It looks like this is an oversight from my part. When determining the fields to be sent to PayPal, a fresh version of the form meta is used without getting run through the gform_pre_render filter. Your new choices are probably getting save as an entry, but the PayPal add-on thinks there aren't any products selected and bypasses the PayPal checkout.&#60;br /&#62;
I will take a deeper look into this and see what I can do to fix it.&#60;br /&#62;
Meanwhile, you can use the gform_paypal_query (&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_paypal_query&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_paypal_query&#60;/a&#62;) to manually add your drop down values to the PayPal query. You may need to add a dummy value to your drop down so that the PayPal checkout does not get bypassed.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>peculiar on "paypal dynamic options"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/paypal-dynamic-options#post-23702</link>
			<pubDate>Tue, 19 Apr 2011 16:09:12 +0000</pubDate>
			<dc:creator>peculiar</dc:creator>
			<guid isPermaLink="false">23702@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;There aren't any errors at all. If I override the dropdown (which works fine), it seems to ignore that the form is associated with paypal, and the form will submit like a normal form.&#60;/p&#62;
&#60;p&#62;Here is the function that I'm using....&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_pre_render_5&#38;#39;, &#38;#39;custom_event_tickets&#38;#39;);

function custom_event_tickets($form_meta) {
	global $sp_ecp;
	$formId =  $form_meta[&#38;#39;id&#38;#39;];
		$options = sp_get_events(&#38;#39;100&#38;#39;);
		//print_r_html ($form_meta);
		//Creating drop down item array.

		$items = array();
		//Adding initial blank value.
		$items[] = array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;Choose...&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;quot;Choose...&#38;quot;, &#38;quot;isSelected&#38;quot; =&#38;gt; &#38;quot;1&#38;quot;, &#38;quot;price&#38;quot;=&#38;gt;&#38;#39;$0.00&#38;#39;);

 		//Adding Available Events and prices to the items array

		foreach ( $options as $option )
			{
				$cost = sp_get_cost($option-&#38;gt;ID);
				if ($cost == &#38;quot;Free&#38;quot;) $cost = &#38;quot;$0&#38;quot;;
				$items[] = array(&#38;quot;value&#38;quot; =&#38;gt; $option-&#38;gt;post_title . &#38;#39;... &#38;#39; .$cost, &#38;quot;text&#38;quot; =&#38;gt; $option-&#38;gt;post_title . &#38;#39;... &#38;#39; .$cost, &#38;quot;isSelected&#38;quot; =&#38;gt; &#38;quot;&#38;quot;, &#38;quot;price&#38;quot; =&#38;gt; $cost . &#38;quot;.00&#38;quot; );
			}

		foreach($form_meta[&#38;quot;fields&#38;quot;] as &#38;amp;$field) {
			if($field[&#38;quot;id&#38;quot;] == 1)
        		{
           			$field[&#38;quot;type&#38;quot;] = &#38;quot;select&#38;quot;;
            		$field[&#38;quot;choices&#38;quot;] = $items;
				}
		}

		//print_r_html ($form_meta);
		return $form_meta;

}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;my choices array looks like this before I make the change (this works fine):&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[choices] =&#38;gt; Array
                        (
                            [0] =&#38;gt; Array
                                (
                                    [text] =&#38;gt;First Choice
                                    [value] =&#38;gt; First Choice
                                    [isSelected] =&#38;gt; 1
                                    [price] =&#38;gt; $10.00
                                )

                            [1] =&#38;gt; Array
                                (
                                    [text] =&#38;gt; Second Choice
                                    [value] =&#38;gt; Second Choice
                                    [isSelected] =&#38;gt;
                                    [price] =&#38;gt;$12.00
                                )

                            [2] =&#38;gt; Array
                                (
                                    [text] =&#38;gt; Third Choice
                                    [value] =&#38;gt; Third Choice
                                    [isSelected] =&#38;gt;
                                    [price] =&#38;gt; $15.00
                                )

                        )&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I made sure that my dynamic array showed the same info, the same way, which looks like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[choices] =&#38;gt; Array
                        (
                            [0] =&#38;gt; Array
                                (
                                    [text] =&#38;gt; Choose...
                                    [value] =&#38;gt; Choose...
                                    [isSelected] =&#38;gt; 1
                                    [price] =&#38;gt; $0.00
                                )

                            [1] =&#38;gt; Array
                                (
                                    [value] =&#38;gt; Nathan Angelo... $10
                                    [text] =&#38;gt; Nathan Angelo... $10
                                    [isSelected] =&#38;gt;
                                    [price] =&#38;gt; $10.00
                                )

                            [2] =&#38;gt; Array
                                (
                                    [value] =&#38;gt; Marvin &#38;amp; Leanda King... $0
                                    [text] =&#38;gt; Marvin &#38;amp; Leanda King... $0
                                    [isSelected] =&#38;gt;
                                    [price] =&#38;gt; $0.00
                                )

                            [3] =&#38;gt; Array
                                (
                                    [value] =&#38;gt; Parachute Musical / Mike Mains... $10
                                    [text] =&#38;gt; Parachute Musical / Mike Mains... $10
                                    [isSelected] =&#38;gt;
                                    [price] =&#38;gt; $10.00
                                )&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I might easily be overlooking something. I appreciate the help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "paypal dynamic options"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/paypal-dynamic-options#post-23692</link>
			<pubDate>Tue, 19 Apr 2011 14:47:53 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">23692@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;What exactly does not work? Does it trigger a validation error?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>peculiar on "paypal dynamic options"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/paypal-dynamic-options#post-23685</link>
			<pubDate>Tue, 19 Apr 2011 13:54:56 +0000</pubDate>
			<dc:creator>peculiar</dc:creator>
			<guid isPermaLink="false">23685@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Guys,&#60;/p&#62;
&#60;p&#62;I'm trying to us the &#34;gform_pre_render&#34; filter to create a dropdown list for a product using the paypal addon. &#60;/p&#62;
&#60;p&#62;If I use the filter, my option list displays correctly, but the paypal add-on no longer works. &#60;/p&#62;
&#60;p&#62;Am I using the wrong filter to accomplish this? &#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
