Save data if checkbox is checked

flyboeing 01 Dec, 2025

Hi,

In my form I have a textfield where I can put in the registration. Via javascript other fields are filled with additional information and all the data is saved to database A. If the javascript cannot find a match and the other fields are not filled, I fill the field manually and would like the save the data to database A but also to database B.

In my form I added a checkbox and in the submit part I placed a php action with an event. In the event I have the Save data for saving the data to database B.

My question is, how do I let my php action check the checkbox and if it is checked save the form to both databases?

Max_admin 01 Dec, 2025
Answer

Hi flyboeing

The PHP code can be like this:

if(!empty($this->data("checkbox_name"))){
return "save_b";
}

then your Save Data to database B can be inside the "save_b" event in the PHP action

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