Deleting records

How to prevent unintended record deletion in a CF form.

Overview

The issue occurs because the event switcher is placed incorrectly, causing records to be cleared even when the 'no' option is selected.
Move the event switcher to the submit area of the form page to ensure the deletion action only triggers upon form submission with the correct selection.

Answered
ChronoForms v8
kr kraadde 26 Dec, 2025

Max,

I am still looking for a way to setup a form that allows the user to delet a selected record.The following is the result:

What I have sofar is a working first page that lists all records:

and the following second page:

What now happen is that even when the option nein (= no deletion) is selected, the record is cleared only the id still remains in the database.Also the html dont work as I expected:

<h1>
Möchtest Du wirklich diesen Anlass löschen:
<br> 
<table>
<tr><td>ID:</td>                  <td>{data:id}</td></tr>
<tr><td>Beschreibung:</td>                  <td>{data:beschreibung}</td></tr>
<tr><td>Datum:</td>                  <td>{data:datum_1}</td></tr>
</table>
</h1>

What I am doing wrong here?

Max_admin Max_admin 27 Dec, 2025
Answer

Hi kraadde

if you want the record to be deleted when the "loschen" button is clicked with "ja" selected then you need to move the Event Switcher to the Submit area of that page, because once the page is submitted then it's the Submit part which runs.

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Post a Reply