Using V4 and V5 Forms Together

swmckay 08 Apr, 2015
Hello,

With the recent intro of V5 I've started using V5 forms alongside by existing V4 forms. My site includes a registration form (v5) along with multiple V4/V5 forms on the user side. I'm having issues saving and pulling data from the table. At the bottom of some of the forms it will have "cf_user_id=xxx" but in my db read function I'm pulling using cf_id. I'm wondering what the difference is between CF_ID and CF_USER_ID from V4 to V5 and their general purpose. Perhaps I need to realign the CF's I'm using?

Any guidance is greatly appreciated!
swmckay 14 Apr, 2015
Here's is what I'm getting on debugger for my V5 form as I use DB Read:

Data Array
Array
(
    [id] => 89
    [careerprofilebuild] => 
    [cf_id] => 79
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
    [2] => Array
        (
            [DB Read] => Array
                (
                    [Queries] => Array
                        (
                            [0] => SELECT `chronoform_data1`.`cf_id` AS `chronoform_data1.cf_id` FROM `j16_chronoforms_data_careerprofile` AS `chronoform_data1`
                        )

                )

        )

)
GreyHead 15 Apr, 2015
Hi swmckay,

Max changed some of the default column names between CFV4 and CFv5 by removing the cf_ - but you can still add that manually in the Create Table page if you prefer.

In CFv4 cf_id was usually the record id (primary key) and is unique; cf_user_id was the current User ID so would be 0 for guests and might repeat for logged in users. Only in the case of the Joomla! User table will these be the same - and you really shouldn't update that directly with a DB Save action.

In CFv5 the defaults are id and user_id and are used in the same way.

Bob
This topic is locked and no more replies can be posted.