Hello! I am having the following issue:
I have a chronoconnectivity list which is connected with a chronoforms form for editing the data. My problem is that i need to update also a second row in a second table except the main table according to the id of these rows.The names of the columns are "catid" and "category" respectively. I managed to have the data appeared from the second table also in the form with different model id and despite I have 2 DB save actions only for the 1st table is working. I also tried to do it with custom php code but again with no success.
Any help would be highly appreciated,
Thank you in advance
I have a chronoconnectivity list which is connected with a chronoforms form for editing the data. My problem is that i need to update also a second row in a second table except the main table according to the id of these rows.The names of the columns are "catid" and "category" respectively. I managed to have the data appeared from the second table also in the form with different model id and despite I have 2 DB save actions only for the 1st table is working. I also tried to do it with custom php code but again with no success.
Any help would be highly appreciated,
Thank you in advance
Hi greek_batter,
Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
Note: if you are using the Easy Wizard you may need to switch to the Advanced Wizard to do this; if you want to continue to use the Easy Wizard please make a copy of your form first and add the Debugger action to the copy.
Bob
Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
Note: if you are using the Easy Wizard you may need to switch to the Advanced Wizard to do this; if you want to continue to use the Easy Wizard please make a copy of your form first and add the Debugger action to the copy.
Bob
hello again and sorry for my late reply...I tried to put a debug onsumbit but the problem is that when I press the subit then I return to chronoconnectivity list..I do not know whether is helpful but I post here the debug when the form loads and takes the date from db..Else could you tell me please how to make form to remain when I press subit? Thank you in advance.. it is the [catid] that i cant change..
[code]
[code]
Array
(
[Approx_Memory_Usage] => 1434456
[Approx_Time] => 0.024600982666
[SQL] => Array
(
[0] => SELECT `editdata`.*, `Category`.`id` AS `Category.id`, `Category`.`parent` AS `Category.parent`, `Category`.`name` AS `Category.name`, `Category`.`description` AS `Category.description`, `Category`.`ordering` AS `Category.ordering`, `Category`.`published` AS `Category.published`, `Category`.`metadata_description` AS `Category.metadata_description`, `Category`.`metadata_keywords` AS `Category.metadata_keywords`, `Country`.`id` AS `Country.id`, `Country`.`title` AS `Country.title`, `Country`.`code` AS `Country.code`, `Country`.`zipcode` AS `Country.zipcode`, `Country`.`published` AS `Country.published`, `Country`.`ordering` AS `Country.ordering`, `Country`.`description` AS `Country.description`, `Country`.`image` AS `Country.image`, `Country`.`default_country` AS `Country.default_country`, `Country`.`currency` AS `Country.currency`, `Country`.`currency_symbol` AS `Country.currency_symbol`, `Region`.`id` AS `Region.id`, `Region`.`title` AS `Region.title`, `Region`.`alias` AS `Region.alias`, `Region`.`description` AS `Region.description`, `Region`.`fulldescription` AS `Region.fulldescription`, `Region`.`created_date` AS `Region.created_date`, `Region`.`parent_id` AS `Region.parent_id`, `Region`.`ordering` AS `Region.ordering`, `Region`.`published` AS `Region.published`, `Region`.`country_id` AS `Region.country_id`, `Region`.`default_region` AS `Region.default_region`, `catad`.`catid` AS `catad.catid`, `catad`.`adid` AS `catad.adid` FROM `z3vk6_adsmanager_ads` AS `editdata` INNER JOIN `z3vk6_adsmanager_categories` AS `Category` ON Category.id=editdata.category INNER JOIN ` z3vk6_adsmanager_countries` AS `Country` ON Country.id=editdata.ad_prefecture INNER JOIN `z3vk6_adsmanager_regions` AS `Region` ON Region.id=editdata.ad_nomos INNER JOIN `z3vk6_adsmanager_adcat` AS `catad` ON catad.adid=editdata.id WHERE `editdata`.`id` = '6'
)
[data] => Array
(
[0] => Array
(
[Category] => Array
(
[id] => 11
[parent] => 1
[name] => Τοπογραφικές μελέτες
[description] =>
[ordering] => 6
[published] => 1
[metadata_description] =>
[metadata_keywords] =>
)
[Country] => Array
(
[id] => 249
[title] => Ηπειρος
=>
[zipcode] => 0
[published] => 1
[ordering] => 7
[description] =>
[image] =>
[default_country] => 0
[currency] =>
[currency_symbol] =>
)
[Region] => Array
(
[id] => 39
[title] => Αθήνα - Δυτικά Προάστια
[alias] => Αθήνα-Δυτικά-Προάστια
[description] =>
[fulldescription] =>
[created_date] => 2011-04-07 14:35:28
[parent_id] => 0
[ordering] => 1
[published] => 1
[country_id] => 254
[default_region] => 0
)
[catad] => Array
(
[catid] => 60
[adid] => 6
)
[editdata] => Array
(
[id] => 6
[category] => 11
[userid] => 0
[name] =>
[ad_zip] =>
[ad_city] => Kavala
[ad_phone] => 6947427267
[email] =>
[ad_kindof] =>
[ad_headline] => Ανακαινιση εξοχικου
[ad_text] => testtest
[ad_state] =>
[ad_price] => 1000
[date_created] => 0000-00-00 00:00:00
[date_recall] =>
[expiration_date] => 2012-07-31
[recall_mail_sent] => 1
[views] => 0
[published] => 0
[ad_projectstart] => 2012-07-29
[ad_cell] => 6947427267
[ad_prefecture] => 249
[ad_nomos] => 39
[metadata_description] =>
[metadata_keywords] =>
[images] =>
)
)
)
)
Hi greek_batter,
Can you run the form directly from a URL so that it doesn't return to ChronoConnectivity?
Bob
Can you run the form directly from a URL so that it doesn't return to ChronoConnectivity?
Bob
Hello,
In most cases you don't need DB save to save any of the connection's tables, the connection should do that, first make sure that your main table is storing the data without a db save, then enable the "Save/update" setting under the "operations" tab for your associated table, if your configuration is correct then it should save the associated table data as well.
Regards,
Max
In most cases you don't need DB save to save any of the connection's tables, the connection should do that, first make sure that your main table is storing the data without a db save, then enable the "Save/update" setting under the "operations" tab for your associated table, if your configuration is correct then it should save the associated table data as well.
Regards,
Max
First of all thank you very much both for your help. I think I can override this problem after ur help...This is the debug code after I press submit (I have two db save actions in it one for every table).
Admin if I understood you correctly, assuming that my settings are correct should I have no actions at all in onSubmit area?
Thank you,
Admin if I understood you correctly, assuming that my settings are correct should I have no actions at all in onSubmit area?
Thank you,
Array
(
[option] => com_chronoforms
[chronoform] => EditForm
[event] => submit
[Itemid] =>
[editdata] => Array
(
[cf_uid] => af04c68336d556e134d659699dcb1ca4
[cf_created] => 2012-08-07 11:16:44
[cf_ipaddress] => 109.242.198.13
[cf_user_id] => 42
[option] => com_chronoforms
[chronoform] => EditForm
[event] => submit
[Itemid] =>
[editdata] => Array
(
[id] =>
[ad_headline] => test title
[ad_city] => test city
[ad_text] => test
[ad_price] => 10000
[expiration_date] =>
[name] => test name
[category] => 14
)
[catad] => Array
(
[catid] => 14
[adid] => 12
)
[input_submit_8] => Submit
[ebb04b4473e3995b777bc7b9573a67ff] => 1
[id] => 69
)
[catad] => Array
(
[cf_uid] => f13ff793ea1d0c5f632bac6519a91b89
[cf_created] => 2012-08-07 11:16:44
[cf_ipaddress] => 109.242.198.13
[cf_user_id] => 42
[option] => com_chronoforms
[chronoform] => EditForm
[event] => submit
[Itemid] =>
[editdata] => Array
(
[cf_uid] => af04c68336d556e134d659699dcb1ca4
[cf_created] => 2012-08-07 11:16:44
[cf_ipaddress] => 109.242.198.13
[cf_user_id] => 42
[option] => com_chronoforms
[chronoform] => EditForm
[event] => submit
[Itemid] =>
[editdata] => Array
(
[id] =>
[ad_headline] => test title
[ad_city] => test city
[ad_text] => test
[ad_price] => 10000
[expiration_date] =>
[name] => test name
[category] => 14
)
[catad] => Array
(
[catid] => 14
[adid] => 12
)
[input_submit_8] => Submit
[ebb04b4473e3995b777bc7b9573a67ff] => 1
[id] => 69
)
[catad] => Array
(
[catid] => 14
[adid] => 12
)
[input_submit_8] => Submit
[ebb04b4473e3995b777bc7b9573a67ff] => 1
[editdata_id] => 69
[catid] =>
)
[input_submit_8] => Submit
[ebb04b4473e3995b777bc7b9573a67ff] => 1
[editdata_id] => 69
[catad_catid] =>
)
Validation Errors:
Array
(
)
Debug Data
Αποτυχία της συνάρτησης (failure of function) Tableadsmanager_adcat: :store
Duplicate entry '0-60' for key 'PRIMARY' SQL=INSERT INTO `z3vk6_adsmanager_adcat` () VALUES ()
Hi,
Yes, you don't need any actions in the submit event if you only want to store the data, but you can add any extra actions which will be processed before saving the data.
Please follow my suggestion in the last post, test with main table first (which has save enabled by default), then enable the "save/update" setting for associated tables.
Regards,
Max
Yes, you don't need any actions in the submit event if you only want to store the data, but you can add any extra actions which will be processed before saving the data.
Please follow my suggestion in the last post, test with main table first (which has save enabled by default), then enable the "save/update" setting for associated tables.
Regards,
Max
This topic is locked and no more replies can be posted.
