Stuck! I need a CF6 kick start.

NickOg 07 Jun, 2017
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
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
Max_admin 07 Jun, 2017
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":

{var:read_data4.Model}


Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
NickOg 07 Jun, 2017
Thanks Max
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
Max_admin 30 Jun, 2017
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
NickOg 30 Jun, 2017
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
Max_admin 30 Jun, 2017
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
NickOg 30 Jun, 2017
Hi Max

I have the manual - thanks - but not the patch.

Nick
Max_admin 02 Jul, 2017
Hi Nick,

I have just sent it by email, please test it and let me know the results.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
NickOg 19 Jul, 2017
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
Max_admin 19 Jul, 2017
Hi Nick,

Great, thanks for the confirmation.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.