chronoforms 5 link chronoconectivity

How to pass user data to a ChronoForms field when linked via ChronoConnectivity.

Overview

The issue occurs because the form field name must include the model reference, and standard PHP code for setting user data does not execute correctly in this linked context.
Use a PHP snippet that explicitly targets the model within the form's data array, such as setting the user ID with the correct model prefix to ensure the data is saved properly.

Answered
id ideagrup 16 May, 2014
I have a big problem. v5

When i create a new record from "chronoconnectivity", conexion opens "chronoforms" and you can create a new record.

But there are two problems

1. the name of the field in the form must have the model reference e.g. ( myModel[userJoomla] )
Then "chronoconnectivity" no saves user_id and other Joomla fields.

2.For resolve the problem, you say better to use php code e.g.
<?php $user =& JFactory::getUser(); $form->data['user_id'] => $user->id; ?>


But when "chronoforms" is linked to chronoconnecttivity this reference no runs.
I change "data" for "mymodel" and neither.

I need a php sentence to put user_id to chronoforms field linked to chronoconnectivity

Thanks
id ideagrup 19 May, 2014
Answer
I have discovered like do it 😀
<?php
$user =& JFactory::getUser();
$form->data[ModelFCV5]['user_id'] = $user->get('id');
?>

OK, Thanks,
This topic is locked and no more replies can be posted.