Forums

CC6 editable table with text fields

matcarls 13 Mar, 2019
Hi

I am trying to do a "simple" editable table with two columns in CC6. I have been looking for examples for this for several days.

Below is the top of a debugger and some screenshots of my CC:
Array
(
    [read_langcode] => Array
        (
            [log] => Array
                (
                    [0] => SELECT `mod_langcode`.`id` AS `mod_langcode.id`, `mod_langcode`.`LangCode` AS `mod_langcode.LangCode`, `mod_langcode`.`LangDescr` AS `mod_langcode.LangDescr` FROM `dms_langcode` AS `mod_langcode` ORDER BY `mod_langcode.LangCode` ASC LIMIT 1000;
                )

            [var] => Array
                (
                    [0] => Array
                        (
                            [mod_langcode] => Array
                                (
                                    [id] => 10
                                    [LangCode] => dan
                                    [LangDescr] => Dansk
                                )
                        )
                    [1] => Array
                        (
                            [mod_langcode] => Array
                                (
                                    [id] => 6
                                    [LangCode] => deu
                                    [LangDescr] => Deutch
                                )
                        )



What do I write in value to make it show current value for this column, based on the debugger above?

Next issue is update the record with a new value. I have begun with a submit-button, but it wont post any to the db-table. How to do that?


Any help, please. I think I am going nuts face-meh-blank
Regards Mattias
healyhatman 13 Mar, 2019
Well for a start the value should be {var:tbl_langcode.row.mod_langcode.Langcode}
matcarls 14 Mar, 2019
Thanks for the help, but unfortunately the column is as empty as it always has been:


Value changed accordingly:

So there must be something more that's wrong. Any ideas?

Regards Mattias
healyhatman 14 Mar, 2019
Welp it's working for me mate. don't know what to tell you.
{var:TABLE_NAME.row.MODEL.DATABASEFIELDNAME}
Max_admin 16 Mar, 2019
Hi,

To debug this you can try to use {var:tbl_langcode.row} in the field "label", see what value does the row variable have then change the shortcode accordig to that!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
matcarls 18 Mar, 2019
It seems like the only difference is a capital C vs small c in the fieldname. But the tips from Max helped me find it. Thanks a lot for that.

Now I need to make it post back to the db too. I already changed the submit to a toolbar button. But I am missing something because it wont post anything to the db,
This topic is locked and no more replies can be posted.