problem with db primary key and updates

tn tnfviper 03 Jul, 2011
have created a table with a primary key (combining 2 fields). however when i try to get my form to create a record it doesnt work. it will only work when i have a primary key of id with autoincrement.
but this makes updating the records impossible. i am probably missing something very simple but really would appreciate any help. am using latest cf and joomla v1.6
thanks in advance
Gr GreyHead 03 Jul, 2011
Hi tnfviper ,

True, the built-in ChronoForms code relies on a single column primary key. Nothing stops you from writing your own query to save the form data though.

Bob
tn tnfviper 03 Jul, 2011
ah ok. can manage that. where would i put the code. its my first time using chronoforms and not sure where/how to place custom code

thanks in advance.
Gr GreyHead 03 Jul, 2011
Hi tnfviper,

Drag in a Custom Code box to the OnSubmit event and add the code to that. You can access the form data in the $form->data array

Bob
tn tnfviper 04 Jul, 2011
thanks for the quick reply. will try this later
This topic is locked and no more replies can be posted.