Forums

New form, automatic saves new row

westlandsehalve 07 Jan, 2020
Hello,

I've created a new form, to insert simpel record into a database table.

It work fine, but when I open the form it always creates a new record into the database.
How can I prevent this from happening?
GreyHead 08 Jan, 2020
Hi westlandsehalve,

I'm not clear exactly what is happening here :-(

The Save Data action should be in the form Submit event.

Bob
westlandsehalve 08 Jan, 2020
Hey Bob,

Thanks for helping thinking about this.

That's a thing.

I created the view and then defined the action (acties): save_data. I guess did something wrong .

It seems he just raises the event save_Data
I expect that when he submits the form the screen validations ( mandatory fields ) should be raised, that's not the case.


westlandsehalve 08 Jan, 2020
I just added , debugging before the save-data action, and this is waht it brings up..

so to me it shows, he raises the save_Deelnemer action
Array
(
    [option] => com_chronoforms6
    [cont] => manager
    [chronoform] => Inschrijving_Jeugdloop
    [09bcf549421525551e4852fcdb1d2ed9] => 863f51f39b7fa0d4431a13d82105ac73
    [d11158c465f79c2b5104723e999089ce] => a1a0622eaa7bf9c369f2b33125fed951
)
Array
(
)
Array
(
    [option] => com_chronoforms6
    [cont] => manager
    [chronoform] => Inschrijving_Jeugdloop
    [09bcf549421525551e4852fcdb1d2ed9] => 863f51f39b7fa0d4431a13d82105ac73
    [d11158c465f79c2b5104723e999089ce] => a1a0622eaa7bf9c369f2b33125fed951
)
Array
(
    [save_deelnemer] => Array
        (
            [data] => Array
                (
                    [created] => 2020-01-08 19:47:11
                    [user_id] => 768
healyhatman 08 Jan, 2020
You must have the save data action in the load event, instead of the submit event where it's supposed to be
westlandsehalve 13 Jan, 2020
Thanks,

But i can not figure out where the events are defined.
healyhatman 13 Jan, 2020
In the Setup tab (old mode) or the Actions tab (new mode)
westlandsehalve 29 Jan, 2020
Sorry, but I do not understand were on the action page I can configure in which event the action is defined.
healyhatman 29 Jan, 2020
Really!?! Care to share a screenshot?
healyhatman 30 Jan, 2020
So that giant tab saying iNSCHRJEJjEGUG or whatever? That's your event. You can make a new one at the bottom, where it says "+Page"
This topic is locked and no more replies can be posted.