Skip Navigation

[Resolved] cred-delete-post-link action : Not reloading page

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 3 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1872803

When I use the following shortcode in a Views loop, It does not reload the page. When I click the Delete link, it does display the message and the delete link changes to "Deleting..." but the page does not reload. When I reload the page manually, I can see that the post was deleted.

[cred-delete-post-link action='delete' onsuccess='self' message="Are you sure you what to delete this note?" class="cred-refresh-after-delete"]Delete[/cred-delete-post-link]

I am using class="cred-refresh-after-delete"

How can I fix this to reload the current page?

SUGGESTION: What would be *GREAT* would be to just refresh the View with ajax without having to reload the page entirely. I have seen many requests to be able to refresh views like this. Is this being looked at? It would provide for much faster and modern applications. Ajax is already implemented in views with the search and filter functionality. Would it be hard to give us an option to refresh views without reloading the page?

Anyway, just my 2 cents...

Thanks!

Vic

#1874691

Hi, the syntax for the delete post link generated by Forms has changed a bit recently to provide more compatibility with Blocks, and cred_delete_post_link has been deprecated as of Forms 2.5.6. This alternative shortcode will display a link to delete the post and refresh the page:

[cred-delete-post action='delete' onsuccess='self']Delete[/cred-delete-post]

Note that confirmation messages are not triggered with the cred-delete-post shortcode. In lieu of a confirmation message, it is possible to change the delete action to trash, so those posts could be recovered in wp-admin if necessary.