<?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 Tag: AJAX - Recent Topics</title>
		<link>https://legacy.forums.gravityhelp.com/tags/ajax</link>
		<description>Gravity Support Forums Tag: AJAX - Recent Topics</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 03:22:01 +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/tags/ajax/topics" rel="self" type="application/rss+xml" />

		<item>
			<title>paulviola on "Form doesn&#039;t submit"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/form-doesnt-submit-1#post-308684</link>
			<pubDate>Fri, 07 Jun 2013 15:12:53 +0000</pubDate>
			<dc:creator>paulviola</dc:creator>
			<guid isPermaLink="false">308684@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm having an issue getting the form to submit:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://scottlasserbooks.com/contact/&#34; rel=&#34;nofollow&#34;&#62;http://scottlasserbooks.com/contact/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I've installed this like I have previously, but it is not working. I do not get a confirmation message, warning that I didn't fill out fields, nor does it submit either to email or the entries section in the backend.  I've already followed the steps of deactivating theme, activating 2010 and testing.  I also deactivated all plugins and still get the same results.&#60;/p&#62;
&#60;p&#62;Your help would be GREATLY appreciated.&#60;/p&#62;
&#60;p&#62;Thank you,&#60;/p&#62;
&#60;p&#62;Jordan C.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>stav on "Dynamic ajax category child dropdown"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamic-ajax-category-child-dropdown#post-60336</link>
			<pubDate>Thu, 24 May 2012 19:37:41 +0000</pubDate>
			<dc:creator>stav</dc:creator>
			<guid isPermaLink="false">60336@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi i need some help on how can i post selected variable from one dynamic dropdown to second one with ajax.&#60;br /&#62;
Here is my code and i need some help on how can i accomplish this.&#60;br /&#62;
Thank you.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;//Dynamic category dropdown
add_filter(&#38;quot;gform_pre_render_2&#38;quot;, &#38;quot;monitor_single_dropdown&#38;quot;);
function monitor_single_dropdown($form){

	global $wpdb;
	$nomos_table = $wpdb-&#38;gt;prefix . &#38;#39;nomous&#38;#39;;
	$wp_nomos_search = $wpdb-&#38;gt;get_results(&#38;quot;SELECT nomos_ID, nomos_Title FROM $nomos_table ORDER BY nomos_ID ASC&#38;quot;);

	//Creating drop down item array.
	$items = array();

	//Adding initial blank value.
	//$items[] = array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;quot;&#38;quot;);

	 //Adding dimos titles to the items array
	foreach ( $wp_nomos_search as $nomostitle ){
	$is_selected = $nomostitle-&#38;gt;nomos_Title == &#38;quot;Test&#38;quot; ? true : false;
		$items[] = array(&#38;quot;value&#38;quot; =&#38;gt; $nomostitle-&#38;gt;nomos_ID, &#38;quot;text&#38;quot; =&#38;gt; $nomostitle-&#38;gt;nomos_Title, &#38;quot;isSelected&#38;quot;=&#38;gt; $is_selected);
	}

	//Adding other... item
	//$items[] = array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;Other...&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;quot;other&#38;quot;);

	 //Adding items to field id 28
	    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field)

	        if($field[&#38;quot;id&#38;quot;] == 28){
	            $field[&#38;quot;type&#38;quot;] = &#38;quot;select&#38;quot;;
	            $field[&#38;quot;choices&#38;quot;] = $items;
	        }

?&#38;gt;
&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;

jQuery(document).ready(function(){

	jQuery(&#38;#39;#input_2_28&#38;#39;).change(function(){
			var mainCat=jQuery(&#38;#39;#input_2_28&#38;#39;).val();

			// call ajax
			 jQuery(&#38;quot;#input_2_30&#38;quot;).empty();
				jQuery.ajax({
					url:&#38;quot;&#38;lt;?php bloginfo( &#38;#39;wpurl&#38;#39; ); ?&#38;gt;/wp-admin/admin-ajax.php&#38;quot;,
					type:&#38;#39;POST&#38;#39;,
				    data:&#38;#39;action=monitor_children_dropdown&#38;amp;main_catid=&#38;#39; + mainCat,

					 success:function(results)
						 {
	    	//	alert(results);
		 //   jQuery(&#38;quot;#input_2_30&#38;quot;).append(results);
								}
						   });
				  }
							);

});
&#38;lt;/script&#38;gt;

&#38;lt;?php
return $form;
}

add_filter(&#38;quot;gform_pre_render_2&#38;quot;, &#38;quot;monitor_children_dropdown&#38;quot;);

function monitor_children_dropdown($form) {
$parentCat=$_POST[&#38;#39;main_catid&#38;#39;];

global $wpdb;
$dimoi_table = $wpdb-&#38;gt;prefix . &#38;#39;dimoi&#38;#39;; 

$wp_dimostitle_search = $wpdb-&#38;gt;get_results(&#38;quot;SELECT dimos_ID, dimos_Title FROM $dimoi_table WHERE nomos_ID=$parentCat ORDER BY dimos_ID ASC&#38;quot;);

//Creating drop down item array.
$items = array();

//Adding initial blank value.
//$items[] = array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;quot;&#38;quot;);

 //Adding dimos titles to the items array
foreach ( $wp_dimostitle_search as $dimostitle ){
$is_selected = $dimostitle-&#38;gt;dimos_Title == &#38;quot;Test&#38;quot; ? true : false;
	$items[] = array(&#38;quot;value&#38;quot; =&#38;gt; $dimostitle-&#38;gt;dimos_Title, &#38;quot;text&#38;quot; =&#38;gt; $dimostitle-&#38;gt;dimos_Title, &#38;quot;isSelected&#38;quot;=&#38;gt; $is_selected);
}

//Adding other... item
$items[] = array(&#38;quot;text&#38;quot; =&#38;gt; &#38;quot;Other...&#38;quot;, &#38;quot;value&#38;quot; =&#38;gt; &#38;quot;other&#38;quot;);

 //Adding items to field id 30
    foreach($form[&#38;quot;fields&#38;quot;] as &#38;amp;$field)

        if($field[&#38;quot;id&#38;quot;] == 30){
            $field[&#38;quot;type&#38;quot;] = &#38;quot;select&#38;quot;;
            $field[&#38;quot;choices&#38;quot;] = $items;
        }

    return $form;

//return the result to the ajax post
die();
}

add_action( &#38;#39;wp_ajax_nopriv_monitor_children_dropdown&#38;#39;, &#38;#39;monitor_children_dropdown&#38;#39;); //keep for people who allow post before registration
add_action( &#38;#39;wp_ajax_monitor_children_dropdown&#38;#39;, &#38;#39;monitor_children_dropdown&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>pronamic on "No confirmation message with display progressbar and AJAX"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/no-confirmation-message-with-display-progressbar-and-ajax#post-334018</link>
			<pubDate>Thu, 20 Jun 2013 06:17:47 +0000</pubDate>
			<dc:creator>pronamic</dc:creator>
			<guid isPermaLink="false">334018@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;We found an bug with AJAX enabled forms wich have paging and the &#34;Display completed progress bar on confirmation&#34; setting enabled. The text confirmation message isn't displayed after completing the form.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Twig Interactive on "Need to set document.domain for Ajax-enabled submissions"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/need-to-set-documentdomain-for-ajax-enabled-submissions#post-337141</link>
			<pubDate>Fri, 21 Jun 2013 16:44:55 +0000</pubDate>
			<dc:creator>Twig Interactive</dc:creator>
			<guid isPermaLink="false">337141@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am running a site (www.example.com) that uses iframes from a subdomain (test.example.com).&#60;/p&#62;
&#60;p&#62;In order to communicate between them (due to same-origin policy) I need to set the JavaScript variable &#60;code&#62;document.domain = &#38;#39;example.com&#38;#39;&#60;/code&#62; . This is all fine and works great.&#60;/p&#62;
&#60;p&#62;However, when Gravity Forms in introduced, the Ajax-enabled submissions fail (because presumably the Ajax code returned that gets loaded into the hidden GF iframe expects the standard &#60;a href=&#34;http://www.example.com&#34; rel=&#34;nofollow&#34;&#62;http://www.example.com&#60;/a&#62;)&#60;/p&#62;
&#60;p&#62;Sadly, browsers do NOT let you reset the document domain back to the original, once you have set it to the superdomain.&#60;/p&#62;
&#60;p&#62;Long story short: I need to be able to insert the &#60;code&#62;document.domain&#60;/code&#62; code into the HTML returned by the Ajax submission of a form. I don't see a JavaScript hook for such a thing. Is there a way to do this via a PHP hook?&#60;/p&#62;
&#60;p&#62;I know I can just turn Ajax off and it'll work, but that's not an elegant solution.&#60;/p&#62;
&#60;p&#62;Any advice would really be appreciated! Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>m4change on "Clearing Confirmation and Showing the Form Again?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/clearing-confirmation-and-showing-the-form-again#post-9188</link>
			<pubDate>Tue, 31 Aug 2010 13:33:53 +0000</pubDate>
			<dc:creator>m4change</dc:creator>
			<guid isPermaLink="false">9188@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I can't seem to figure out how to go about accomplishing this.&#60;/p&#62;
&#60;p&#62;I want to allow the user to click a link to bring up the form again.  I'm using and &#34;AJAX&#34; form and currently the confirmation message replaces the form, rather than hiding it.  I would like to hide the form and clear / show it (hiding the confirmation) if the user wants to submit again.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>daanvh on "Create placeholder and keep placeholder while using ajax during validation"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/create-placeholder-and-keep-placeholder-while-using-ajax-during-validation#post-337055</link>
			<pubDate>Fri, 21 Jun 2013 15:34:34 +0000</pubDate>
			<dc:creator>daanvh</dc:creator>
			<guid isPermaLink="false">337055@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;This is not a question, but I have struggled a bit with this and thought that if others did as well, they don't need to purchase a gravity perks piece of software which is actually more expensive than the plugin itself. &#60;/p&#62;
&#60;p&#62;I ran into the problem that 1) I needed placeholders instead of labels for my field, and with that solved, I experienced that these placeholders were being removed on form validation errors when using ajax. &#60;/p&#62;
&#60;p&#62;Its not a very clean fix, but with a little help of javascript I managed to solve my problem.&#60;/p&#62;
&#60;p&#62;1) create a 'custom' validation error message in functions.php&#60;/p&#62;
&#60;p&#62;add the following code to functions.php:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_validation_message_1&#38;quot;, &#38;quot;change_message&#38;quot;, 10, 2);
function change_message($message, $form){
  return &#38;quot;&#38;lt;script&#38;gt;placeholder();&#38;lt;/script&#38;gt;&#38;lt;p&#38;gt;This is your validation error text&#38;lt;/p&#38;gt;&#38;quot; . $form[&#38;quot;contact&#38;quot;];

}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Notice I included a javascript function, that's for later. Documentation on this: &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_validation_message&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_validation_message&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Now also put in the code that will add placeholder fields in GF (in functions.php):&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;/* Copy this code in the functions.php file */
add_action(&#38;quot;gform_field_standard_settings&#38;quot;, &#38;quot;my_standard_settings&#38;quot;, 10, 2);
function my_standard_settings($position, $form_id){
    // Create settings on position 25 (right after Field Label)
    if($position == 25){
        ?&#38;gt;
        &#38;lt;li style=&#38;quot;display: list-item; &#38;quot;&#38;gt;
            &#38;lt;label for=&#38;quot;field_placeholder&#38;quot;&#38;gt;Placeholder Text
                &#38;lt;!-- Tooltip to help users understand what this field does --&#38;gt;
                &#38;lt;a href=&#38;quot;javascript:void(0);&#38;quot; tooltip=&#38;quot;&#38;lt;h6&#38;gt;Placeholder&#38;lt;/h6&#38;gt;Enter the placeholder/default text for this field.&#38;quot;&#38;gt;(?)&#38;lt;/a&#38;gt;
            &#38;lt;/label&#38;gt;
            &#38;lt;input type=&#38;quot;text&#38;quot; id=&#38;quot;field_placeholder&#38;quot; size=&#38;quot;35&#38;quot; onkeyup=&#38;quot;SetFieldProperty(&#38;#39;placeholder&#38;#39;, this.value);&#38;quot;&#38;gt;
        &#38;lt;/li&#38;gt;
        &#38;lt;?php
    }
}

/* Copy this code in the functions.php file */
add_action(&#38;quot;gform_editor_js&#38;quot;, &#38;quot;my_gform_editor_js&#38;quot;);
function my_gform_editor_js(){
    ?&#38;gt;
    &#38;lt;script&#38;gt;
        //binding to the load field settings event to initialize the checkbox
        jQuery(document).bind(&#38;quot;gform_load_field_settings&#38;quot;, function(event, field, form){
            jQuery(&#38;quot;#field_placeholder&#38;quot;).val(field[&#38;quot;placeholder&#38;quot;]);
        });
    &#38;lt;/script&#38;gt;
    &#38;lt;?php
}

/* Copy this code in the functions.php file */
add_action(&#38;#39;gform_enqueue_scripts&#38;#39;,&#38;quot;my_gform_enqueue_scripts&#38;quot;, 10, 2);
function my_gform_enqueue_scripts($form, $is_ajax=false){
    ?&#38;gt;

&#38;lt;script&#38;gt;
    jQuery(function(){
        &#38;lt;?php
        /* Go through each one of the form fields */
        foreach($form[&#38;#39;fields&#38;#39;] as $i=&#38;gt;$field){
            /* Check if the field has an assigned placeholder */
            if(isset($field[&#38;#39;placeholder&#38;#39;]) &#38;amp;&#38;amp; !empty($field[&#38;#39;placeholder&#38;#39;])){
                /* If a placeholder text exists, inject it as a new property to the field using jQuery */
                ?&#38;gt;
                jQuery(&#38;#39;#input_&#38;lt;?php echo $form[&#38;#39;id&#38;#39;]?&#38;gt;_&#38;lt;?php echo $field[&#38;#39;id&#38;#39;]?&#38;gt;&#38;#39;).attr(&#38;#39;placeholder&#38;#39;,&#38;#39;&#38;lt;?php echo $field[&#38;#39;placeholder&#38;#39;]?&#38;gt;&#38;#39;);
                &#38;lt;?php
            }
        }
        ?&#38;gt;
    });
    &#38;lt;/script&#38;gt;
    &#38;lt;?php
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;script source: &#60;a href=&#34;http://www.bogdan-nikolic.com/wordpress-gravity-forms-placeholder-which-works-with-ajax-validation/#comment-100&#34; rel=&#34;nofollow&#34;&#62;http://www.bogdan-nikolic.com/wordpress-gravity-forms-placeholder-which-works-with-ajax-validation/#comment-100&#60;/a&#62; (it says it works with ajax but for me it doesnt after form validation errors)&#60;/p&#62;
&#60;p&#62;Now lastly, add the function you added in the error message to your page: &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script&#38;gt;

	function placeholder() {
	 $(&#38;#39;#input_1_1&#38;#39;).attr(&#38;#39;placeholder&#38;#39;,&#38;#39;Message *&#38;#39;);
     $(&#38;#39;#input_1_2&#38;#39;).attr(&#38;#39;placeholder&#38;#39;,&#38;#39;Name *&#38;#39;);
  }

&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I just created 2 for the fields with id input_1_1 and 1_2, but you can figure it out. &#60;/p&#62;
&#60;p&#62;Again, not a clean fix, but a fix. if anyone knows a cleaner solution (via functions.php) I am happy to hear from you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>textalk on "Dynamically load forms with Ajax"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/dynamically-load-forms-with-ajax#post-333712</link>
			<pubDate>Thu, 20 Jun 2013 03:29:08 +0000</pubDate>
			<dc:creator>textalk</dc:creator>
			<guid isPermaLink="false">333712@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm having a page with approx. 13 forms. The page consists of many hidden divs containing links to fancyboxes with the generated forms. The problem is that when the page is loading, all hidden content shows up for a short time before &#34;falling into place&#34;.&#60;/p&#62;
&#60;p&#62;Since I don't have a problem if I remove the forms from the fancyboxes, I figured the problem is caused by having so many forms generated upon loading the page.&#60;/p&#62;
&#60;p&#62;I then tried to dynamically load the forms via Ajax. However, the procedure in Wordpress for doing this is to go via admin-ajax.php, in an &#34;admin context&#34;. This causes the forms to appear as editable but disabled and it just looks awkward.&#60;/p&#62;
&#60;p&#62;Is there any possible solution for dynamically loading the forms into fancyboxes when these are being shown?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>svsouza on "WordPress plug in assistant"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/wordpress-plug-in-assistant#post-204309</link>
			<pubDate>Wed, 10 Apr 2013 17:56:09 +0000</pubDate>
			<dc:creator>svsouza</dc:creator>
			<guid isPermaLink="false">204309@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;When I look at my form from the wordpress plug in, it looks fine.  But when I look at it actually on the page it has these items on EVERY single item:&#60;/p&#62;
&#60;p&#62;Checkboxes : Field ID 3&#60;br /&#62;
DeleteDuplicateEdit&#60;/p&#62;
&#60;p&#62;How do I get rid of that?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bryan Monzon on "Loading gravity form via ajax"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/loading-gravity-form-via-ajax#post-92075</link>
			<pubDate>Fri, 16 Nov 2012 21:13:51 +0000</pubDate>
			<dc:creator>Bryan Monzon</dc:creator>
			<guid isPermaLink="false">92075@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hey guys,&#60;/p&#62;
&#60;p&#62;I've searched here and across google to find the answer, and I've found a few people with the problem, however I haven't seen full resolution.&#60;/p&#62;
&#60;p&#62;We have a site that pulls in content templates via ajax and loads them onto the page. Some of those pages have gravity forms in their templates. While the HTML structure is being pulled in, the forms look a little bit messed up. When you hit the page with the gravity forms without ajax, the form works fine. I've confirmed that I'm grabbing everything with the ajax ( entire HTML structure, and embedded javascript that is printed out with the gravity_forms() function.&#60;/p&#62;
&#60;p&#62;Here are a couple of images that might help clarify:&#60;br /&#62;
What form looks like pulled in via ajax: &#60;a href=&#34;http://cl.ly/image/1l3E1U1Q3T2e&#34; rel=&#34;nofollow&#34;&#62;http://cl.ly/image/1l3E1U1Q3T2e&#60;/a&#62;&#60;br /&#62;
What form looks like when viewed normally: &#60;a href=&#34;http://cl.ly/image/0q051z070L1J&#34; rel=&#34;nofollow&#34;&#62;http://cl.ly/image/0q051z070L1J&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;When viewed normally, the form works perfectly, and submits via ajax perfectly. My guess is that there is some javascript function that needs to fire, that isn't running when it's pulled in via ajax.&#60;/p&#62;
&#60;p&#62;Thanks in advance for your help!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>maggew on "Embed Form Wordpress Dashboard"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/embed-form-wordpress-dashboard#post-323349</link>
			<pubDate>Fri, 14 Jun 2013 13:39:12 +0000</pubDate>
			<dc:creator>maggew</dc:creator>
			<guid isPermaLink="false">323349@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I would like to have a dashboard metabox with a basic form.&#60;/p&#62;
&#60;p&#62;Is this possible?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
