Skip to main content
Added notes after solution found
Source Link
Paul Frost
  • 1.1k
  • 11
  • 23

I have a form for people offering or requesting to share-a-lift to an event. I'm using the Guest Entries plugin.

But I need them to be able to edit and delete those entries, as once a pair are matched up they need removing from the list of offers/requests to avoid multiple offers.

I have a page with the list of the lifts on offer or requested and have a link from each of the entries to the form page but with the entryId as segment 2.

My Problems:How do I code the Delete button?

When I call the form template url with a segment 2 I get a 404.

How do I code the Delete button? (turns out you can't)

I appreciate that this is not the most secure way of doing things, but the client has been using a similar form/method on their old site and have not had any fraudulent or malicious issues in many years. If anyone can suggest a more secure method without any logins or registration I'm open to ideas.

The final solution

As you can't delete or edit Guest Entries @carlcs came up with the idea of allowing a second entry (in another entry type) with a common field to the first.

In the template listing all the offers and requests you look for entries from both entry types with a matching field, and if a match is found don't show either. See the code in his answer for the details.

I have a form for people offering or requesting to share-a-lift to an event. I'm using the Guest Entries plugin.

But I need them to be able to edit and delete those entries, as once a pair are matched up they need removing from the list of offers/requests to avoid multiple offers.

I have a page with the list of the lifts on offer or requested and have a link from each of the entries to the form page but with the entryId as segment 2.

My Problems:

When I call the form template url with a segment 2 I get a 404.

How do I code the Delete button?

I appreciate that this is not the most secure way of doing things, but the client has been using a similar form/method on their old site and have not had any fraudulent or malicious issues in many years. If anyone can suggest a more secure method without any logins or registration I'm open to ideas.

I have a form for people offering or requesting to share-a-lift to an event. I'm using the Guest Entries plugin.

But I need them to be able to edit and delete those entries, as once a pair are matched up they need removing from the list of offers/requests to avoid multiple offers.

I have a page with the list of the lifts on offer or requested and have a link from each of the entries to the form page but with the entryId as segment 2.

How do I code the Delete button? (turns out you can't)

I appreciate that this is not the most secure way of doing things, but the client has been using a similar form/method on their old site and have not had any fraudulent or malicious issues in many years. If anyone can suggest a more secure method without any logins or registration I'm open to ideas.

The final solution

As you can't delete or edit Guest Entries @carlcs came up with the idea of allowing a second entry (in another entry type) with a common field to the first.

In the template listing all the offers and requests you look for entries from both entry types with a matching field, and if a match is found don't show either. See the code in his answer for the details.

edited tags; edited title
Link
Brad Bell
  • 67.6k
  • 6
  • 75
  • 145

How Using the Guest Entries plugin, how can I allow people to delete guest entriesedit/delete?

edited title
Link
Paul Frost
  • 1.1k
  • 11
  • 23

How can I allow people to delete of guest entries?

Source Link
Paul Frost
  • 1.1k
  • 11
  • 23
Loading