I have a formulary that reads one record depending of user Joomla.
Is running ok but:
Don't updates the changes.
It does not error but no put the changes.
The form has a uniq id hidden but ...
On Events DBREAD the options i put:
Multiread = NO
Enabled modelID = YES
Model_id = Ac
Conditions =
<?php $user =& JFactory::getUser();?>
<?php return array('User_id' => $user->get('id')); ?>
RUNNING OK
Why dont update when I press submit??
Put the DBSAVE Event ?
Thanks
Hi ideagrup,
Do you have a DB Save action in the form On Submit event? You need to have that; and you must have a hidden input in the form to pass the record id to be updated as well.
Bob
Ohh, Yes I active it and now updates the record perfect.
Only have a problem. Updates the record and creates a new record empty too.
I've trying repair it but i dont know like do it.
Can you help me?
Thanks
HI ideagrup,
I've no idea - do you have two DB Save actions? Or an Event Loop somewhere? Or are you calling this from from ChronoConnectivity?
Bob
do you have two DB Save actions? NO
an Event Loop somewhere? NO, Is posible this?
are you calling this from from ChronoConnectivity? NO, is a chronoform but with DBREAD.
Hi,
In order for your form to update a record into a table then you must have the following:
#1- DB Save action in the submit event
#2- your form must have a field with name matching the name of the table's primary key.
If you created the table using CF then the primary key is most probably "id" and so your form must have a field named "id"
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Yes, all is ok.
1. DB Save action in the submit event is OK
1 I have a key cf_id in database and in the form. OK
And remember the problem:
1. chronoforms read one record. OK
2. I put changes in it. OK
3. chronoforms updates the record in database. OK
THE PROBLEM IS: chronoforms creates a new blank record too.
I think that the problem is this:
in DB Viewer appears two times
Table: mytable
because i open two connections dbRead and dbSave
Well, there is no reason that you get 2 records saved unless you have 2 "db save" actions.
Please post a screenshot for your form's "submit" event.
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
3 images.
submit
dbsave
debugger
I see all ok
Tom
It looks like all is ok!!
Please make sure that you are testing the form using the "Test form" link, and that you don't have any other forms loaded on the same page in modules/plugins or whatever.
If this doesn't help then please send me an admin login in PM or email to check it!
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?