Hello,
I followed http://www.chronoengine.com/faqs/72-ccv5/5208-connectivity-edit-with-chronoforms.html but I have problem, when I want to update record ....... Open the form, change fields and I click on save. but When I take a look to db I see the new record.
what am I doing wrong?
thx
I followed http://www.chronoengine.com/faqs/72-ccv5/5208-connectivity-edit-with-chronoforms.html but I have problem, when I want to update record ....... Open the form, change fields and I click on save. but When I take a look to db I see the new record.
what am I doing wrong?
thx
Hi homeopat,
Does your form have a hidden field with name matching the primary key field name in your table ?
Regards,
Max
Does your form have a hidden field with name matching the primary key field name in your table ?
Regards,
Max
no, he didnt. I did use the form from CFv4 and import him to CFv5.
thx
thx
Hi Max or Bob,
if I have relation 1:N how to build a model?
I have set up:
Model: pronajimatelkontakty
relation: HasToMany
associated model: pronajimatel
associated save/delete: yes
FK: cf_id2
join conditions: <?php return array("pronajimatelkontakty.cf_id2=pronajimatel.cf_id");?>
data in form are shown, but when I change some value in form then arent updated to db after submit.
any idea? THX
if I have relation 1:N how to build a model?
I have set up:
Model: pronajimatelkontakty
relation: HasToMany
associated model: pronajimatel
associated save/delete: yes
FK: cf_id2
join conditions: <?php return array("pronajimatelkontakty.cf_id2=pronajimatel.cf_id");?>
data in form are shown, but when I change some value in form then arent updated to db after submit.
any idea? THX
You mean data is not updated in the 2nd table ? or the first one ?
in the second table
the scheme of relations is (I use models id):
1st (main) -> 2nd (has realation BelongsTo)
1st (main) -> 3rd (has realation BelongsTo)
3rd -> 4th (has realation HasToMany)
Hope, u understand this
the scheme of relations is (I use models id):
1st (main) -> 2nd (has realation BelongsTo)
1st (main) -> 3rd (has realation BelongsTo)
3rd -> 4th (has realation HasToMany)
Hope, u understand this
Does your form include the primary key of the 2nd table records ? they must be available as well!
Regards,
Max
Regards,
Max
I realized that I maybe have bad relation type.
1st (main) -> 2nd is in 1:1
1st (main) -> 3rd is in 1:1
3rd -> 4th is in 1:N
I am not sure what are differences between BelongsTo and HasOne?
First I used belongsTo, but maybe have to be HasOne.
Sorry I didnt mention it. I am talking about 4th table (1:N)
Do u mean that form must include primary key as a hidden field of every table? I have hidden field as PK of first table only, but data are updated in every table except of 4th table.
every table I has cf_id as PK, 4th table has cf_id2 as FK.
I am not sure if u understand me
thx
1st (main) -> 2nd is in 1:1
1st (main) -> 3rd is in 1:1
3rd -> 4th is in 1:N
I am not sure what are differences between BelongsTo and HasOne?
First I used belongsTo, but maybe have to be HasOne.
Sorry I didnt mention it. I am talking about 4th table (1:N)
Do u mean that form must include primary key as a hidden field of every table? I have hidden field as PK of first table only, but data are updated in every table except of 4th table.
every table I has cf_id as PK, 4th table has cf_id2 as FK.
I am not sure if u understand me
thx
This topic is locked and no more replies can be posted.