I can't, its for a client, and its not ready for public consumption ><
I'm building a web app, and I need to be able to reload the gravity_form without reloading the page. The only way to get the gravityform back after 1 submission is either AJAX or a page-refresh. And since a page-refresh is out of the question, I have to use AJAX.
Unfortunately WP makes you use admin-ajax.php to process AJAX requests with their API, which is why I'm getting the delete/edit buttons.
I've managed to hack the delete/edit buttons out but its definitely not foolproof/perfect.
this is my JS function I use to (re)load the gravityform:
function LoadPhotoForm() {
$.get(ajaxurl,{'action':'load_photo_form'},function(data){
$("#upload_form").hide().html(data);
$("#upload_form .field_delete_icon").remove();
$("#upload_form .field_edit_icon").remove();
$("#upload_form").fadeIn();
});
}
Posted 13 years ago on Monday June 20, 2011 |
Permalink