Skip Navigation

[Resolved] Confirmation of Delete Post

This support ticket is created 3 years 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 8 replies, has 2 voices.

Last updated by igorL-3 3 years ago.

Assisted by: Minesh.

Author
Posts
#2026037

Tell us what you are trying to do? Is there a simple way to get the user to confirm that he wants to delete a post? Is there an option in [cred-delete-post] similar to the JS alarm()?

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#2026065

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no confirmation message available on delete post now.

If you want to use the confirmation box, you should still try to use the shortcode [cred_delete_post_link] as explain with the followiring reply:
=> https://toolset.com/forums/topic/using-custom-confirmation-messages-causes-delete-post-shortcode-to-fail/#post-1501543

#2026207

This is great thank you!!! Where did that short code come from I coudn't find it in the documentation?

And another thing, how can I redirect to a spesific page on sucess of delete?

Thank you in advance!!

#2026215

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

[cred_delete_post_link] is a deprecated shortcode. The new shortcode we suggest to use is [cred-delete-post] but it will not offer the confirmation JS box.

#2026225

Is there a way to redirect to a specific page after delete?

#2026231

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

If you are using the shortcode: [cred-delete-post]

You can use the shortcode attribute onsuccess='9999' where you pass the 9999 as your original page/post ID where you want to redirect.

For example:

[cred-delete-post type="button" onsuccess="123" action="delete"]Delete this[/cred-delete-post]

More info:
=> https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred-delete-post

#2026243

No I meant redirect with the [cred_delete_post_link] shortcode. I know about the [cred-delete-post] from documentaions

#2026251

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You should try to uses the attribute <string> redirect with your page/post ID.

For example:

[cred_delete_post_link action='trash' redirect='99999' message='This resource has been deleted' message_show='1' class='cred-refresh-after-delete']Delete This Resource[/cred_delete_post_link]
#2026257

This worke well!!
My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.