Support

Account

Home Forums Add-ons Repeater Field Repeater entries from front end post won't save Reply To: Repeater entries from front end post won't save

  • Hi James!

    Thank you so much for your help!!!

    https://gist.github.com/ty2u/b4ce1e251a0ead2ebb2c6ae69c407774

    Hopefully it makes sense to you.

    #1 still seems to have issues but I’m thinking #2 is a browser feature/bug because I can now only reproduce it sometimes and it goes away after I close the browser and open it again, which incidentally required me to retype this whole post haha.

    Further inspection has proved #2 to be caused by the Inspector. Only when I open the Developer Tools/Inspector in Google Chrome it doesn’t ask to resubmit the form once it’s submitted the first time and then I try refreshing the page while the Inspector is open. The page just refreshes without the alert to ask if you want to resubmit it. If I close the Inspector and try to submit it then prompts me to continue or not again. I never noticed this feature before.

    I also tried some javascript mentioned on here https://www.advancedcustomfields.com/resources/acf_form/ that didn’t seem to do anything but I probably didn’t do it right:

    jQuery(document).ready(function () {
    	"use strict";
    
    	// frontend feedback acf form
    	if(jQuery("div[id^='feedback-entry-']").length > 0) {
    		acf.do_action('append', jQuery('#acf-form'));
    	}
    });
    

    I also tried this in functions.php instead of the above js to no avail:

    
    add_action( 'wp_head', 'add_acf_js' );
    function add_acf_js() {
    	echo '<script>(function($) {
    	
    	// setup fields
    	acf.do_action("append", $("#acf-form"));
    	
    })(jQuery);	
    </script>';
    }
    

    Thanks again!