<?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: Product Field - why can&#039;t I edit the validation message?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/product-field-why-cant-i-edit-the-validation-message</link>
		<description>Gravity Support Forums Topic: Product Field - why can&#039;t I edit the validation message?</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 22:11:09 +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/product-field-why-cant-i-edit-the-validation-message" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Product Field - why can&#039;t I edit the validation message?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/product-field-why-cant-i-edit-the-validation-message#post-72850</link>
			<pubDate>Tue, 28 Aug 2012 00:42:50 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">72850@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You're welcome.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>wmboy on "Product Field - why can&#039;t I edit the validation message?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/product-field-why-cant-i-edit-the-validation-message#post-72775</link>
			<pubDate>Mon, 27 Aug 2012 14:30:45 +0000</pubDate>
			<dc:creator>wmboy</dc:creator>
			<guid isPermaLink="false">72775@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for your help Chris.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Product Field - why can&#039;t I edit the validation message?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/product-field-why-cant-i-edit-the-validation-message#post-72752</link>
			<pubDate>Mon, 27 Aug 2012 11:31:56 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">72752@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Turns out the original problem was due to a bug and was unintentional.  I have emailed @wmboy the latest version which includes a fix for this issue.  If you are experiencing the same issue, please email &#60;a href=&#34;mailto:chris@rocketgenius.com&#34;&#62;chris@rocketgenius.com&#60;/a&#62; and I will send the same version to you.  Please reference this topic in your email.  Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Product Field - why can&#039;t I edit the validation message?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/product-field-why-cant-i-edit-the-validation-message#post-72679</link>
			<pubDate>Sun, 26 Aug 2012 21:45:39 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">72679@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;If you look at the source of that page: view-source: &#60;a href=&#34;http://flyadriatic.co.nz/gift-voucher/&#34; rel=&#34;nofollow&#34;&#62;http://flyadriatic.co.nz/gift-voucher/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The script is not being enqueued.  We first need to make sure to get the script added to the page, and then we need to make sure it works.  Right now, it's not being added to the page.&#60;/p&#62;
&#60;p&#62;Can you try embedding the form without AJAX and see if is enqueued then?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>wmboy on "Product Field - why can&#039;t I edit the validation message?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/product-field-why-cant-i-edit-the-validation-message#post-72662</link>
			<pubDate>Sun, 26 Aug 2012 17:42:21 +0000</pubDate>
			<dc:creator>wmboy</dc:creator>
			<guid isPermaLink="false">72662@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for your reply, I've added the code to the functions file and added the javscript file, it doesn't seem to work though...&#60;/p&#62;
&#60;p&#62;The form ID is 4 and the field ID is 9 so I added the following:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;gform_enqueue_scripts_4&#38;#39;, &#38;#39;enqueue_validation_message&#38;#39;, 10, 2);
function enqueue_validation_message($form, $is_ajax) {
        // enqueue the scroll to top script which is stored in the child theme /js/ subdirectory, and depends on jQuery
    wp_enqueue_script(&#38;#39;validation_message&#38;#39;, get_stylesheet_directory_uri() . &#38;#39;/js/validation-message.js&#38;#39;, array(&#38;#39;jquery&#38;#39;));
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Created new file validation-message.js in new folder js/&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;jQuery(document).ready(function($) {
        $(&#38;#39;div.gform_wrapper div.gform_body li#field_4_9 div.validation_message&#38;#39;).html(&#38;#39;Please enter a valid amount here.&#38;#39;);
});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;a href=&#34;http://flyadriatic.co.nz/gift-voucher/&#34; rel=&#34;nofollow&#34;&#62;Here's a link of the page...&#60;/a&#62;&#60;br /&#62;
});
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Product Field - why can&#039;t I edit the validation message?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/product-field-why-cant-i-edit-the-validation-message#post-72624</link>
			<pubDate>Sun, 26 Aug 2012 01:52:53 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">72624@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I've asked the developers for their feedback on this one, why it is specifically set up this way.  Thanks for your patience, as it's the weekend and outside our normal support hours.&#60;/p&#62;
&#60;p&#62;In the meantime, it's possible to change this message with jQuery if you like.   There are just a few lines of code.&#60;/p&#62;
&#60;p&#62;See this form:&#60;br /&#62;
&#60;a href=&#34;http://gravity.chrishajer.com/change-validation-message-on-user-defined-price-product/&#34; rel=&#34;nofollow&#34;&#62;http://gravity.chrishajer.com/change-validation-message-on-user-defined-price-product/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Submit with nothing entered and the form will come back with two validation errors. The first one uses the default validation error message of &#34;This field is required.&#34;  The second field, the donation field (user-defined price), will come back with an error message of &#34;You gotta give me something here.&#34;  That is changed with the following code:&#60;/p&#62;
&#60;p&#62;Add this to your theme's functions.php&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
// change 142 here to your form ID
add_action(&#38;#39;gform_enqueue_scripts_142&#38;#39;, &#38;#39;enqueue_validation_message&#38;#39;, 10, 2);
function enqueue_validation_message($form, $is_ajax) {
        // enqueue the scroll to top script which is stored in the child theme /js/ subdirectory, and depends on jQuery
    wp_enqueue_script(&#38;#39;validation_message&#38;#39;, get_stylesheet_directory_uri() . &#38;#39;/js/validation-message.js&#38;#39;, array(&#38;#39;jquery&#38;#39;));
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That code references a script in your theme (or child theme)'s &#34;js&#34; directory called validation-message.js. That file contains this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[js]
jQuery(document).ready(function($) {
        $(&#38;#39;div.gform_wrapper div.gform_body li#field_142_2 div.validation_message&#38;#39;).html(&#38;#39;You gotta give me something here.&#38;#39;);
});&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You will need to change the &#60;strong&#62;#field_142_2&#60;/strong&#62; to the ID of the form field for which you want to have this validation message.  &#60;/p&#62;
&#60;p&#62;If you have any questions implementing this, please let us know.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>wmboy on "Product Field - why can&#039;t I edit the validation message?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/product-field-why-cant-i-edit-the-validation-message#post-72544</link>
			<pubDate>Fri, 24 Aug 2012 23:08:06 +0000</pubDate>
			<dc:creator>wmboy</dc:creator>
			<guid isPermaLink="false">72544@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;From &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Product&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Product&#60;/a&#62; ...&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;     Validation Message&#60;/p&#62;
&#60;p&#62;        If you would like to override the default error validation for a field, enter it here. This message will be displayed if there is an error with this field when the user submits the form. This option is only available when the Drop Down or Multiple Choice field type is selected.&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Why can't you have a custom validation message if you've set it to a User Defined Price?  I would like to modify the &#34;This field is required&#34; message.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
