Home › Forums › Front-end Issues › Frontend WYSIWYG Problems › Reply To: Frontend WYSIWYG Problems
Maybe it is worth more information, but I understand that “live” triggers are able to be used on DOM elements populated after the page has loaded. Likewise, I have set up some working code in order to close this created popup when the newly created ACF form is submitted.
Also here is a helpful example for other users viewing this forum to submit their acf form with jQuery – works very nicely.
$( "#acf-ajax-form" ).live( "submit", function( event ) {
event.preventDefault();
$(this).find('input[type=submit]').attr("disabled", true).val("Processing...");
var formData = $(this).serialize();
var formUrl = formData.return;
$.post(formUrl, formData, function(response) {
// Close the popup container
$('#my-popup-container').foundation('reveal', 'close' );
// Clear the HTML
$('#my-popup-container').html('');
});
});
Is there a way in which we might perform the jQuery trigger that you suggested above (acf/setup_fields
) to mimic the “live” event?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.