<?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: Hide product fields</title>
		<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields</link>
		<description>Gravity Support Forums Topic: Hide product fields</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 22:50:17 +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/hide-product-fields" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-30984</link>
			<pubDate>Tue, 26 Jul 2011 14:27:46 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">30984@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It's going to be an Advanced Field, not a Post Field, initially.  It's a multi-value field consisting of multiple columns and rows so i'm not sure how we could make it work with post custom fields out of the box as an easy to use feature because custom fields are single value fields.  This is a multi-dimensional array with columns a rows.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>curtismchale on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-30979</link>
			<pubDate>Tue, 26 Jul 2011 12:36:59 +0000</pubDate>
			<dc:creator>curtismchale</dc:creator>
			<guid isPermaLink="false">30979@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the clarification. Will it be usable with Custom Post Types out of the box or will is require extra code to get the information in to CPT/Meta boxes?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-30974</link>
			<pubDate>Tue, 26 Jul 2011 11:45:46 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">30974@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;v1.6 is in development.  It should be released as a beta release sometime in August.   The List Field is still planned for this release.&#60;/p&#62;
&#60;p&#62;To clarify, it is not end user field duplication.  It isn't going to let you duplicate existing fields.  It is a List/Datagrid Field.  It allows you to define a field that consists of multiple columns of inputs that you define, and then the end user can add as many rows of data as they would like.  We'll also have an option to limit how many rows they can enter.&#60;/p&#62;
&#60;p&#62;It will be similar to how you add data to a Product Field under the Pricing Fields when adding choices.  There are multiple columns where you enter information and then you can hit plus or minus to add or remove rows.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>curtismchale on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-30959</link>
			<pubDate>Tue, 26 Jul 2011 11:07:04 +0000</pubDate>
			<dc:creator>curtismchale</dc:creator>
			<guid isPermaLink="false">30959@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is there and ETA on 1.6 and will the end user field duplication feature still be in as indicated by this post?&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/optional-multiple-inputs&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/optional-multiple-inputs&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-30337</link>
			<pubDate>Mon, 18 Jul 2011 16:09:48 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">30337@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Just making a note on this post, the next major release won't be 1.5.3.  We have decided the next major release will now be released as v1.6.  It's just a version name change. There are too many new features and enhancements for it to be a 1.5 related point release.  So look for 1.6 to have this feature.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-29778</link>
			<pubDate>Tue, 12 Jul 2011 10:29:46 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">29778@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The next major release will be 1.5.3. We are still collecting requirements for it, so I imagine it will be around 3 months, maybe a little more.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>signo on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-29768</link>
			<pubDate>Tue, 12 Jul 2011 08:59:52 +0000</pubDate>
			<dc:creator>signo</dc:creator>
			<guid isPermaLink="false">29768@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Alex, thanks for your helpful answer. I have one more question, when you say major release you mean 1.6 or 2.0. When could we expect that release where the price fields will be more developer friendly, in one, two, three, six months time frame? I need this answer to make some decisions.&#60;/p&#62;
&#60;p&#62;Thanks and best regards
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-29750</link>
			<pubDate>Mon, 11 Jul 2011 22:23:06 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">29750@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I understand pre-populating product fields are not very developer friendly right now. This will be improved in our next major release.&#60;br /&#62;
For the validation hook, you need to access the price and quantity from the $_POST variable.&#60;br /&#62;
Following is an example to point you in the right direction.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//Replace 165 with your actual Form ID
add_filter(&#38;#39;gform_validation_165&#38;#39;, &#38;#39;custom_validation&#38;#39;);
function custom_validation($validation_result){

    //finding field with ID of 8 and making sure quantity is greater than 0
    foreach($validation_result[&#38;quot;form&#38;quot;][&#38;quot;fields&#38;quot;] as &#38;amp;$field){

        //NOTE: replace 8 with the field you would like to validate
        if($field[&#38;quot;id&#38;quot;] == &#38;quot;8&#38;quot;){

            //Base prices are retrieved using &#38;quot;input_FIELDID_2&#38;quot;
            $base_price = GFCommon::to_number($_POST[&#38;quot;input_8_2&#38;quot;]);

            //Quantities are retrieved using &#38;quot;input_FIELDID_3&#38;quot;
            $quantity = $_POST[&#38;quot;input_8_3&#38;quot;];

            //fails validation if quantity is not a positive integer or if price is less than $20
            if($quantity &#38;lt;= 0 &#124;&#124; $base_price &#38;lt; 20){
                $validation_result[&#38;quot;is_valid&#38;quot;] = false;
                $field[&#38;quot;failed_validation&#38;quot;] = true;
                $field[&#38;quot;validation_message&#38;quot;] = &#38;quot;This field is invalid!&#38;quot;;
            }

            break;
        }
    }
    return $validation_result;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Regarding the translation of the Price and Quantity sublabels, you can translate them using the translation files with PoEdit. Following is a good article explaning how to do that. &#60;a href=&#34;http://weblogtoolscollection.com/archives/2007/08/27/localizing-a-wordpress-plugin-using-poedit/&#34; rel=&#34;nofollow&#34;&#62;http://weblogtoolscollection.com/archives/2007/08/27/localizing-a-wordpress-plugin-using-poedit/&#60;/a&#62;&#60;br /&#62;
If you don't find those strings in your translation file, you may need to update it from the gravityforms.pot file. You can do that in poEdit by clicking on Catalog -&#38;gt; Update from POT file. &#60;a href=&#34;http://tardis1.tinygrab.com/awKN&#34; rel=&#34;nofollow&#34;&#62;http://tardis1.tinygrab.com/awKN&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>signo on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-29742</link>
			<pubDate>Mon, 11 Jul 2011 18:41:24 +0000</pubDate>
			<dc:creator>signo</dc:creator>
			<guid isPermaLink="false">29742@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The form  could have 5 items, that would mean that for every sub field in the a product field i would have to check if the item is valid, read the item form the database and then set the value, the end result would be a very inefficient and slow page to say the least, and me writing 10 filters+functions to do a job that would be more efficient in the form preload action. If you say that this is the only way to do it, i guess will have to do it that way, but please consider implementing some other way to access the product field variables in code.&#60;/p&#62;
&#60;p&#62;But your solution only solves part of the problem. In your code you set the basePrice in the preload form action, i am already doing this, but when i access the value in the validate action i still get 0.00 not the price i placed in the field before, i also need to access the quantity field to check it is bot zero or some strange value, how would i do this?&#60;/p&#62;
&#60;p&#62;Could you please tell me how i could translate the Price and quantity labels? This is very important!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Hide product fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-product-fields#post-29708</link>
			<pubDate>Mon, 11 Jul 2011 17:11:20 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">29708@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is actually a bit tricky. I will look for ways to improve it, but the following should do the trick for you.&#60;/p&#62;
&#60;p&#62;1- You will need to configure your product fields to &#34;Allow field to be populated dynamically&#34; on the advanced tab. Enter unique parameter names for each field. Following are the parameters I used for the code snippet below: &#60;a href=&#34;http://tardis1.tinygrab.com/awEm&#34; rel=&#34;nofollow&#34;&#62;http://tardis1.tinygrab.com/awEm&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;2- Use the following code snippet, replacing the IDs to match your form and fields.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_value_prod1_name&#38;quot;, &#38;quot;prod1_name&#38;quot;);
function prod1_name($name){
   return &#38;quot;new product name&#38;quot;;
}

add_filter(&#38;quot;gform_field_value_prod1_quantity&#38;quot;, &#38;quot;prod1_quantity&#38;quot;);
function prod1_quantity($name){
   return 3;
}

add_filter(&#38;quot;gform_pre_render&#38;quot;, &#38;quot;populate_product&#38;quot;);
function populate_product($form){

    //only setting product for form id 165
    if($form[&#38;quot;id&#38;quot;] != 165)
       return $form;

    //Setting product field id 8. Replace 8 with your actual field id. You can get the field id by looking at the input name in the markup.
    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field)
        if($field[&#38;quot;id&#38;quot;] == 8){
            $field[&#38;quot;label&#38;quot;] = &#38;quot;new product name&#38;quot;;
            $field[&#38;quot;basePrice&#38;quot;] = 22;
        }

    return $form;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
