<?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: gform product field validation error using pre-render</title>
		<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render</link>
		<description>Gravity Support Forums Topic: gform product field validation error using pre-render</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 15:07:33 +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/gform-product-field-validation-error-using-pre-render" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-194478</link>
			<pubDate>Tue, 02 Apr 2013 12:47:33 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">194478@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I will close this topic.  Please use the priority support form and mark the request &#34;Attention David Smith&#34;, or use David's email &#60;a href=&#34;mailto:david@rocketgenius.com&#34;&#62;david@rocketgenius.com&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I removed the passwords from this topic.&#60;/p&#62;
&#60;p&#62;Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-194295</link>
			<pubDate>Tue, 02 Apr 2013 09:11:25 +0000</pubDate>
			<dc:creator>Josh</dc:creator>
			<guid isPermaLink="false">194295@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello, I have made you an admin.&#60;/p&#62;
&#60;p&#62;You will see the test form is ID3 and it is on a test page. The test page is password protected but you should be able to see it as your an admin. The password for the page is &#60;strike&#62;redacted&#60;/strike&#62;&#60;/p&#62;
&#60;p&#62;But you should get the password for your user to your email.&#60;/p&#62;
&#60;p&#62;Please contact me on my admin email if you need any instant questions answering.&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Josh
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-186949</link>
			<pubDate>Wed, 27 Mar 2013 17:04:06 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">186949@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Josh,&#60;/p&#62;
&#60;p&#62;I'm happy to take a look. You can send any login info to david[at]rocketgenius[dot]com.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-186507</link>
			<pubDate>Wed, 27 Mar 2013 08:11:18 +0000</pubDate>
			<dc:creator>Josh</dc:creator>
			<guid isPermaLink="false">186507@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;We have had a slight issue. My colleague sent the link to the client and the client sent the link to the customers. Before it is even finished.&#60;/p&#62;
&#60;p&#62;So what I have done is locked the website from the public to stop the customer using it.&#60;/p&#62;
&#60;p&#62;I will need your email when you get round to this create you a user account so you can access the site/form again.&#60;/p&#62;
&#60;p&#62;Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-185151</link>
			<pubDate>Tue, 26 Mar 2013 06:50:06 +0000</pubDate>
			<dc:creator>Josh</dc:creator>
			<guid isPermaLink="false">185151@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chris. Thanks for looking into this for me. I think it might be an issue with the pricing fields.&#60;/p&#62;
&#60;p&#62;The site maybe going live today - and going over checks, etc, so I need the form to work. So what I have done for temporary measures is removed the product and the quantity field. Then replaced them with the standard radio field (item) and the number field (quantity).&#60;/p&#62;
&#60;p&#62;The form id=2 now submits fine but I cant calculate a total from this automatically.&#60;/p&#62;
&#60;p&#62;I duplicated my orignal broken form id=2 and is now a test form id=3.&#60;/p&#62;
&#60;p&#62;I moved the form to a test item page &#60;a href=&#34;http://resource.redwingmedia.co.uk/test/&#34; rel=&#34;nofollow&#34;&#62;please click here to view&#60;/a&#62; - the password is &#60;strike&#62;redacted&#60;/strike&#62;&#60;/p&#62;
&#60;p&#62;If you require admin access, please send me your email and I can make you a admin user if you wish to investigate the form setup?&#60;/p&#62;
&#60;p&#62;My new pre-render function is here &#60;a href=&#34;http://gist.github.com/jcranny/21f25d6be47070546d9b&#34; rel=&#34;nofollow&#34;&#62;gist.github.com/jcranny/21f25d6be47070546d9b&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-184201</link>
			<pubDate>Mon, 25 Mar 2013 14:22:06 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">184201@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'll ask the development team if they have any ideas for you.  Maybe there is something I've overlooked. Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Josh on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-183942</link>
			<pubDate>Mon, 25 Mar 2013 07:04:22 +0000</pubDate>
			<dc:creator>Josh</dc:creator>
			<guid isPermaLink="false">183942@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is my code now...&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//PRE RENDER ITEM
add_filter(&#38;quot;gform_pre_submission&#38;quot;, &#38;quot;product_items&#38;quot;);
add_filter(&#38;quot;gform_pre_render&#38;quot;, &#38;quot;product_items&#38;quot;);
// add_filter(&#38;quot;gform_admin_pre_render&#38;quot;, &#38;quot;product_items&#38;quot;);
function product_items($form){
    if($form[&#38;quot;id&#38;quot;] != 2) return $form;
    $products = get_field(&#38;#39;item_information&#38;#39;,$post-&#38;gt;ID);
    $items = array();
    foreach($products as $product)
		$items[] = array( &#38;quot;text&#38;quot; =&#38;gt; $product[&#38;#39;order_description&#38;#39;].&#38;#39; &#38;lt;em class=&#38;quot;muted&#38;quot;&#38;gt;€&#38;#39;.$product[&#38;#39;price_euro&#38;#39;].&#38;#39;&#38;lt;/em&#38;gt;&#38;#39;, &#38;quot;value&#38;quot; =&#38;gt; $product[&#38;#39;price_euro&#38;#39;] );
    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field){
        if($field[&#38;quot;id&#38;quot;] == 1 ){
            $field[&#38;quot;choices&#38;quot;] = $items;
            $field[&#38;quot;label&#38;quot;] = get_the_title($post-&#38;gt;ID);
        }
	}
    return $form;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Josh on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-183940</link>
			<pubDate>Mon, 25 Mar 2013 07:03:43 +0000</pubDate>
			<dc:creator>Josh</dc:creator>
			<guid isPermaLink="false">183940@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi chris, thanks for getting back so quick.&#60;/p&#62;
&#60;p&#62;This looked promising but no it does not change it?&#60;/p&#62;
&#60;p&#62;This is the page the form is on. &#60;a href=&#34;http://resource.redwingmedia.co.uk/items/motorcycle-history-timeline/&#34; rel=&#34;nofollow&#34;&#62;See form live here&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If you click the green order button. A pop up should appear.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://i.imgur.com/q8obnY8.png&#34; rel=&#34;nofollow&#34;&#62;See this screenshot&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-183089</link>
			<pubDate>Sun, 24 Mar 2013 15:26:11 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">183089@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Try adding this filter as well:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
add_filter(&#38;quot;gform_pre_submission&#38;quot;, &#38;quot;product_items&#38;quot;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Josh on "gform product field validation error using pre-render"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform-product-field-validation-error-using-pre-render#post-180656</link>
			<pubDate>Fri, 22 Mar 2013 11:39:02 +0000</pubDate>
			<dc:creator>Josh</dc:creator>
			<guid isPermaLink="false">180656@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am pre rending a product field. The product field is a radio type and it is required.&#60;/p&#62;
&#60;p&#62;But even though my pre rendering works, and I selected one, I still get the 'This field is required.'&#60;/p&#62;
&#60;p&#62;See screenshot: &#60;a href=&#34;http://i.imgur.com/znMkAiA.png&#34; rel=&#34;nofollow&#34;&#62;i.imgur.com/znMkAiA.png&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;This is my pre render code. It works fine.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_pre_render&#38;quot;, &#38;quot;product_items&#38;quot;);
// add_filter(&#38;quot;gform_admin_pre_render&#38;quot;, &#38;quot;product_items&#38;quot;);
function product_items($form){
    if($form[&#38;quot;id&#38;quot;] != 2) return $form;
    $products = get_field(&#38;#39;item_information&#38;#39;,$post-&#38;gt;ID);
    $items = array();
    foreach($products as $product)
		$items[] = array( &#38;quot;text&#38;quot; =&#38;gt; $product[&#38;#39;order_description&#38;#39;].&#38;#39; &#38;lt;em class=&#38;quot;muted&#38;quot;&#38;gt;€&#38;#39;.$product[&#38;#39;price_euro&#38;#39;].&#38;#39;&#38;lt;/em&#38;gt;&#38;#39;, &#38;quot;value&#38;quot; =&#38;gt; $product[&#38;#39;price_euro&#38;#39;] );
    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field){
        if($field[&#38;quot;id&#38;quot;] == 1 ){
            $field[&#38;quot;choices&#38;quot;] = $items;
            $field[&#38;quot;label&#38;quot;] = get_the_title($post-&#38;gt;ID);
        }
	}
    return $form;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I dont understand why it wont pass the validation even when it is selected?&#60;/p&#62;
&#60;p&#62;Any help into understanding why I am having validation issues would be great thanks.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
