Hi
I am embarrassed as I just can't get a start on CF6! I thought that I had done enough with CF5 to make it simple but have spent most of the day and am exhausted! Are there any demo CF6 forms with a database read in it? A bit like the demos in CC6?
My working example is a very simple form that reads a record from a table that has a single record. (fig cf00.png)
It reads the data as you can see
I then have a single field on the form that I assumed would show that value renewYear but no good (fig cf01.png)
I am no doubt missing something quite obvious bur can't work it out or find the answer in the forum. 😶😶
I did make more progress with CC6 but the toggle How To has me thrown too!
Regards
I am embarrassed as I just can't get a start on CF6! I thought that I had done enough with CF5 to make it simple but have spent most of the day and am exhausted! Are there any demo CF6 forms with a database read in it? A bit like the demos in CC6?
My working example is a very simple form that reads a record from a table that has a single record. (fig cf00.png)
It reads the data as you can see
Array
(
[read_data4] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`mdlMasterApp`.`id`) AS `mdlMasterApp.count` FROM `u3a_00_master_applications` AS `mdlMasterApp`;
[1] => SELECT `mdlMasterApp`.`id` AS `mdlMasterApp.id`, `mdlMasterApp`.`renewYear` AS `mdlMasterApp.renewYear`, `mdlMasterApp`.`renewOn` AS `mdlMasterApp.renewOn`, `mdlMasterApp`.`halfYearOn` AS `mdlMasterApp.halfYearOn`, `mdlMasterApp`.`txtNote` AS `mdlMasterApp.txtNote`, `mdlMasterApp`.`blnShowNotes` AS `mdlMasterApp.blnShowNotes` FROM `u3a_00_master_applications` AS `mdlMasterApp` LIMIT 30;
)
[var] => Array
(
[0] => Array
(
[mdlMasterApp] => Array
(
[id] => 1
[renewYear] => 2017
[renewOn] => 1
[halfYearOn] => 1
[txtNote] => <h1 style="text-align: left;"><em><strong>Try this</strong></em></h1>
[blnShowNotes] => 1
)
I then have a single field on the form that I assumed would show that value renewYear but no good (fig cf01.png)
I am no doubt missing something quite obvious bur can't work it out or find the answer in the forum. 😶😶
I did make more progress with CC6 but the toggle How To has me thrown too!
Regards
Hi Nick,
The read data in v6 can return different data formats, you have it set to read multiple records, and this is why the variable call does not work, it could work if you include the "0" key.
You need to set the "select type" to first matching record in the read data.
You can also remove the var call from the field value and use the following the data provider of the form under the "Display section":
Best regards,
Max
The read data in v6 can return different data formats, you have it set to read multiple records, and this is why the variable call does not work, it could work if you include the "0" key.
You need to set the "select type" to first matching record in the read data.
You can also remove the var call from the field value and use the following the data provider of the form under the "Display section":
{var:read_data4.Model}
Best regards,
Max
Thanks Max
Closer!
But I am now getting an error
I now have the select type to be first matching record - (fig cf00.png) and the renewYear in the Designer field (fig cf01.png), A bit of trial and error and I suspect that error is coming form the setup which now looks like fig cf002.png
Regards
Nick
Closer!
But I am now getting an error
Warning: Cannot use a scalar value as an array in /hsphere/local/home/pmhu3adv/pmhu3adv.org.au/libraries/cegcore2/libs/arr.php(71) : eval()'d code on line 1
I now have the select type to be first matching record - (fig cf00.png) and the renewYear in the Designer field (fig cf01.png), A bit of trial and error and I suspect that error is coming form the setup which now looks like fig cf002.png
Regards
Nick
Hi Nick,
Apologies for the late reply here.
Do you still receive the warning ?
I have a patch for the warning and a manual (not complete yet) that I can send to you, just send me a message using the "Contact us" page.
Best regards,
Max
Apologies for the late reply here.
Do you still receive the warning ?
I have a patch for the warning and a manual (not complete yet) that I can send to you, just send me a message using the "Contact us" page.
Best regards,
Max
Hi Max
That is fine - I got dragged away elsewhere anyway. I will check that out again and get back to you. That manual would help. Thanks.
Nick
That is fine - I got dragged away elsewhere anyway. I will check that out again and get back to you. That manual would help. Thanks.
Nick
Hi Nick,
I sent you the patch by email, if you still get the error then please let me know to test the new patch.
Best regards,
Max
I sent you the patch by email, if you still get the error then please let me know to test the new patch.
Best regards,
Max
Hi Nick,
I have just sent it by email, please test it and let me know the results.
Best regards,
Max
I have just sent it by email, please test it and let me know the results.
Best regards,
Max
Hi Max
Back in action and I have retested that original form without your replacement app.php. The error was still there. I then uploaded your new version and that error disappears and the data looks good. I will check other forms - old and new - over the next week and let you know how it goes.
Regards
Nick
Back in action and I have retested that original form without your replacement app.php. The error was still there. I then uploaded your new version and that error disappears and the data looks good. I will check other forms - old and new - over the next week and let you know how it goes.
Regards
Nick
Hi Nick,
Great, thanks for the confirmation.
Best regards,
Max
Great, thanks for the confirmation.
Best regards,
Max
This topic is locked and no more replies can be posted.