I have a view which lists all of the entries for a repeatable field group. For each of the items being displayed I want to provide a links to edit or delete the item. For the delete link I'm using cred_delete_post_link. Here's the code I'm using in the view.
[toolset-edit-post-link layout_slug='edit-employment-history-item' target='self' class='btn btn-lg btn-primary']Edit[/toolset-edit-post-link] [cred_delete_post_link action='trash' text='Delete' message='Are you sure you want to delete this employment history item?' message_show='1' class='cred-refresh-after-delete']
The edit link is working but the delete link isn't showing up.
You can list RFG's (Repeatable Field Groups) and link to the Form that lets you edit that RFG, hence, all the fields included within.
For this you need to create an RFG Edit Form as shown here:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/front-end-forms-for-repeatable-field-groups/#forms-for-editing-values-of-existing-repeatable-field-groups
That is then linked in the View listing the RFGs
To directly delete items from within that loop you can use the Post Delete Link as offered by Forms, for example:
[cred_delete_post_link action='trash' text='Delete %TITLE%' message='Are you sure you want to delete this post?' message_show='1']
this, inserted in a view that loops RFG's will directly delete that RFG (note, this includes all the fields within that RFG, just as if you edit the RFG.
I also copy-pasted your version of the delete link to my system and it works great.
I suggest removing eventual custom CSS and HTML/JS to see if it's due to that, or the Theme, or another plugin interfering, or eventually some style conflicts that hide the link.
If you cannot spot the issue, I can have a look, but I would need to log in and eventually also make some test view myself on the site, if this is possible?
Hello,
Thanks for the details, Since you are using Toolset form shortcode to display the "Delete" links, you need to enable the access control "Delete Own Posts using Toolset Forms" for "Applicant" user role, I have done below modification in your website:
Dashboard-> Toolset-> Access control-> Toolset Forms
In column "Delete Own Posts using Toolset Forms", enable the checbox for user role "Applicant", please test again, check if it is fixed.
More help:
https://toolset.com/documentation/user-guides/access-control-for-cred-forms/
Ah thank you! I don't know how I overlooked that. That takes care of my issue. Thank you!