Forums

Edit data to modify it

veronique 29 May, 2014
Hi,

I'm french chronoengine user so sorry for my bad expression. I hope you could help me because I don't find my answer in forums.

I want to edit data recording by clicking on a link from Chronoconnectivity list. To do it, I load the CFv5 form using to record this same data. But form is enmty.

This is my CC list parameters :
[attachment=0]ScreenShot1.jpg[/attachment]
[attachment=1]ScreenShot2.jpg[/attachment]
[attachment=2]ScreenShot3.jpg[/attachment]
And then my CF form parameters
[attachment=3]ScreenShot4.jpg[/attachment]
DB Reader details :
[attachment=4]ScreenShot5.jpg[/attachment]
I tried several syntaxe for where condition but I don't find exact expression like this one cause of URL parameter of the link from CC list (index.php?option=com_chronoconnectivity5&cont=lists&ccname=patronyme&act=edit&gcb={patronyme.id}):
 <?php 
 return array('id' => $_GET->gcb); 
 ?>


Can you help me please to obtain data in form fields when I clic on link from the CC list.

Thanks
Max_admin 04 Jun, 2014
Hi veronique,

You don't need the "DB Read" or any changes to your default form except that you need to change the form fields names to include the "Model id", so instead of naming you field:
patro_patronyme
, it should be:
patronyme[patro_patronyme]
since your model name in CC is: patronyme

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
veronique 17 Jun, 2014
Like that ?

[attachment=0]coorection.jpg[/attachment]

Thanks
Max_admin 21 Jun, 2014
Exactly! CCv5 should be able to load this form with data!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
veronique 30 Jun, 2014
Thanks a lot Max. It begin to play correctly but not totally. Indead, gcb value is "{patronyme.id}". If I replace by a truely value (ex : number "1"), it's correct. Why gcb should {patronyme.id} ?

Debbug rapport :

Array
(
[option] => com_chronoconnectivity5
[cont] => lists
[ccname] => patronyme
[act] => edit
[gcb] => {patronyme.id}
)
Max_admin 02 Jul, 2014
Please remove the "fields" data under the connection settings, also this code is wrong so please remove it:
 <?php 
 return array('id' => $_GET->gcb); 
 ?>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
veronique 06 Jul, 2014
Hi,

After clear "fields" data and condition it's always wrong. Is my Edit linkable syntax is good ? Indead, link is like that : index.php?option=com_chronoconnectivity5&cont=lists&ccname=patronyme&act=edit&gcb={patronyme.id}
Max_admin 08 Jul, 2014
The
{patronyme.id}
should be replaced by the ID, which is why I suggested doing the previous changes, just in case the id field is not loaded.

Please enable the "debug" under the "Frontend view" > General tab (near the bottom) and paste the debug output here!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
veronique 08 Jul, 2014
This is debug message from CC list :
Array
(
    [0] => SELECT `Extension`.`id` AS `Extension.id`, `Extension`.`name` AS `Extension.name` FROM `jnew_chronoengine_extensions` AS `Extension` WHERE `Extension`.`enabled` = '1' ORDER BY `Extension`.`ordering` ASC
    [1] => SELECT `Group`.`id` AS `Group.id`, `Group`.`parent_id` AS `Group.parent_id`, `Group`.`lft` AS `Group.lft`, `Group`.`rgt` AS `Group.rgt`, `Group`.`title` AS `Group.title` FROM `jnew_usergroups` AS `Group` ORDER BY `Group`.`parent_id` ASC, `Group`.`lft`
    [2] => SELECT `Connection`.`id` AS `Connection.id`, `Connection`.`title` AS `Connection.title`, `Connection`.`params` AS `Connection.params`, `Connection`.`extras` AS `Connection.extras`, `Connection`.`published` AS `Connection.published` FROM `jnew_chronoengine_connections` AS `Connection` WHERE `Connection`.`title` = 'patronyme' AND `Connection`.`published` = '1'
    [3] => SELECT COUNT(*) AS `patronyme.count` FROM `jnew_chronoengine_chronoforms_datatable_patronyme` AS `patronyme`
    [4] => SELECT `patronyme`.`patro_patronyme` AS `patronyme.patro_patronyme`, `patronyme`.`patro_variantes` AS `patronyme.patro_variantes`, `patronyme`.`patro_lieu` AS `patronyme.patro_lieu`, `patronyme`.`user_id` AS `patronyme.user_id` FROM `jnew_chronoengine_chronoforms_datatable_patronyme` AS `patronyme` ORDER BY `patronyme`.`patro_patronyme` LIMIT 30
)
Max_admin 09 Jul, 2014
So, there is no "id" field, does your table have a field named "id" ?

The "jnew_chronoengine_chronoforms_datatable_patronyme" I mean!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
veronique 09 Jul, 2014
Yes "jnew_chronoengine_chronoforms_datatable_patronyme" table have a filed called "id".
Max_admin 10 Jul, 2014
Answer
And you don't have any fields inside the "Fields" box under the "patronyme" Model area ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
veronique 12 Jul, 2014
This is what was missing.

Thanks a lot Max.
This topic is locked and no more replies can be posted.