Hi Bob
I want to trigger CF to send an email and display a message after a user submits a specific form. In this form, I added
<?php
$user =& JFactory::getUser();
$form->data['user_id'] = $user->id;
$form->data[`user_name`]=$user->name;
?>
in DB Read event during On Load. And I can see the right data are retrieved from the DB and place in the form array in the debugger message below:
Array
(
[user_id] => 938
[] => Front Desk
[Data] => Array
(
[id] => 937
[name] => Demo Demo
)
)
Per the FAQ, I was under the impression that this is sufficient and I can just access the field by using {user_name} in Display Message and Email. However, upon Submit, the debugger shows:
Array
(
[chronoform] => Username_test
[event] => submit
[user_name] =>
[button2] => Submit
)
And the user_name (a hidden field in the form w/ the name & ID of user_name) is blank. I am sure I did something wrong… Any pointer is much appreciated.
regards,
SH
I want to trigger CF to send an email and display a message after a user submits a specific form. In this form, I added
<?php
$user =& JFactory::getUser();
$form->data['user_id'] = $user->id;
$form->data[`user_name`]=$user->name;
?>
in DB Read event during On Load. And I can see the right data are retrieved from the DB and place in the form array in the debugger message below:
Array
(
[user_id] => 938
[] => Front Desk
[Data] => Array
(
[id] => 937
[name] => Demo Demo
)
)
Per the FAQ, I was under the impression that this is sufficient and I can just access the field by using {user_name} in Display Message and Email. However, upon Submit, the debugger shows:
Array
(
[chronoform] => Username_test
[event] => submit
[user_name] =>
[button2] => Submit
)
And the user_name (a hidden field in the form w/ the name & ID of user_name) is blank. I am sure I did something wrong… Any pointer is much appreciated.
regards,
SH