The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Ajax frm_container_ and frm-entry-update-field
I have a view that will remove a row with ajax when I click the [deletelink] shortcode. Is there a way to do the same thing to a [frm-entry-update-field] shortcode? That doesn't seem to work.
April 17, 2017 at 7:19 pm
[frm-entry-delete-link id=x page_id=y label="Delete"] is likely what you need to be using if you intend to delete an entry. The [frm-entry-update-field] is not for deleting, but updating as the shortcode indicates.
Source: https://formidableforms.com/knowledgebase/allow-users-to-delete-their-entries/
April 17, 2017 at 7:27 pm
I'm using the ajax refresh on the delete link. I would also like to use it on the [frm-entry-update-field] shortcode. I have one that toggles the post status between published and draft. But right now, you need to refresh the page to see that change. I would like to refresh the div with ajax...
April 17, 2017 at 7:31 pm
Ah yes. I too wanted this functionality. I believe I'm using a .ajaxcomplete jQuery event in my solutions.
jQuery( document ).ajaxComplete(function() {
jQuery('#thisdiv').load(document.URL + ' #thisdiv');
});
That should get you close.
April 17, 2017 at 7:55 pm
Your code got a little garbled. Were you suggesting something like this?
jQuery(function($) {
$(document).ajaxComplete(function(){
$('#frm_container_[id]').load(document.URL + ' #frm_container_[id]');
});
});
I imagine the script would have to go in the view's content window, so that we can calculate the id of the id.
But that's not quite working. It's actually crashing my browser, so something's off :)
April 17, 2017 at 8:02 pm
Here is what I'm actually using at the moment.
jQuery(document).ajaxStop(function(){
jQuery("#detail").html('Processing...')
window.location.reload();
});
I'm reloading the page, not just a div.
Is your page public that I can view?
April 17, 2017 at 8:04 pm
I originally had a javascript to reload the page, but because this item is in a tab, I'd rather not reload the page.
The site is online, but it's password protected now. Is there a way I can send you credentials directly?
Thanks
April 17, 2017 at 8:04 pm
http://community.formidableforms.com/hire-a-pro/dev/bobbyclapp/
Click the email icon.
Discussion closed.