I am in the process of upgrading some of my old CFv4 forms to CFv5. Everything has worked well except that I am having trouble loading the requested record in a CFv5 form. Needless to say this works fine in CFv4.
My configuration seems to be OK but for some reason the form is not populated with any data. I am most likely missing something very obvious!
I have an 'edit' link displayed for each record in a ChronoConnectionv4 list. The link contains the variable cf_id and an associated value. In the Conditions box of the DB Read action I have
I have read in many posts here on the forum that it is recommended to turn off Model_ID in DBRead. In my case, I have left Model_ID turned on as my form is fairly complex and this helps keep things organized. My code seems to accommodate the Model_ID (which in the case of this particular DBRead action is AC_ID). I have tested a simplified version of my form with Model_ID turned off and all references to AC_ID removed but the results have been the same.
Any suggestions/help are greatly appreciated and will likely prevent more hair loss ;-)
Thanks in advance,
John
My configuration seems to be OK but for some reason the form is not populated with any data. I am most likely missing something very obvious!
I have an 'edit' link displayed for each record in a ChronoConnectionv4 list. The link contains the variable cf_id and an associated value. In the Conditions box of the DB Read action I have
<?php return array('AC_ID.cf_id' => $form->data['cf_id']); ?>
which reads the variable from the link. A Debugger placed after the DBRead Action shows the generated SQL query which looks perfect. In fact, if I copy the SQL query from the Debugger display and paste it into an SQL window in PHPMyAdmin, the query does exactly what it should and returns the record that I am looking for. In my form, nothing happens and the form just remains unpopulated.
I have read in many posts here on the forum that it is recommended to turn off Model_ID in DBRead. In my case, I have left Model_ID turned on as my form is fairly complex and this helps keep things organized. My code seems to accommodate the Model_ID (which in the case of this particular DBRead action is AC_ID). I have tested a simplified version of my form with Model_ID turned off and all references to AC_ID removed but the results have been the same.
Any suggestions/help are greatly appreciated and will likely prevent more hair loss ;-)
Thanks in advance,
John
As suspected, it was something obvious. Under DB Read, Multi read needs to be set to 'No'. Problem solved.
I'm having a similar problem but the Multi Read is set to 'No'...
I have a simple form with 2 fields: id and Company I've set the 2 field's name and id to "name=id id=id and name=Company, id=Company"
I'm able to get the table data into the Array but the values in the input fields are not populating from this data.
I noticed that if I manually put the value in the url (/index.php?option=com_chronoforms5&chronoform=view_ticket&id=34&Company=Hello) then the form will populate.
Here's my Data Array from the Debug:
I'm sorry if this is the wrong place to post this...
I have a simple form with 2 fields: id and Company I've set the 2 field's name and id to "name=id id=id and name=Company, id=Company"
I'm able to get the table data into the Array but the values in the input fields are not populating from this data.
I noticed that if I manually put the value in the url (/index.php?option=com_chronoforms5&chronoform=view_ticket&id=34&Company=Hello) then the form will populate.
Here's my Data Array from the Debug:
Data Array
Array
(
[option] => com_chronoforms5
[chronoform] => view_ticket
[id] => 34
[Data] => Array
(
[id] => 34
[uniq_id] => 98d558d479c9fe4f1ef2e70ac918ec40740cc0ca
[user_id] => 419
[created] => 2014-10-24 22:26:46
[modified] =>
[Company] => Phone Surgeons
[Status] => Open
[Description] => The address for the machine location is
Phone Surgeons
619 N. Burkhardt Suite D
Evansville, IN 47715
[Type] => New customer
[Assigned] => david
[button6] => Submit
[attachfile] =>
)
)
I'm sorry if this is the wrong place to post this...
This topic is locked and no more replies can be posted.