Only variables should be assigned by reference is the Strict Standards error I get.
It has to do with me calling up the current user information in Joomla so I can log which user is submitting the forms.
I do so by putting this custom code into the onLoad:
Then I put the value of 2 hidden fields as {agentnumber} and {agentname} respectively.
When I go to the form it gives me:
It has to do with me calling up the current user information in Joomla so I can log which user is submitting the forms.
I do so by putting this custom code into the onLoad:
<?php
$user =& JFactory::getUser();
$form->data['agentnumber'] = $user->username;
$form->data['agentname'] = $user->name;
?>
Then I put the value of 2 hidden fields as {agentnumber} and {agentname} respectively.
When I go to the form it gives me:
Strict Standards: Only variables should be assigned by reference in **localsiteinfo**\administrator\components\com_chronoforms\form_actions\custom_code\custom_code.php(19) : eval()'d code on line 2
Resolved:
Changed my code to be:
By deleting the '&' it fixed the issue!
Changed my code to be:
<?php
$user = JFactory::getUser();
$form->data['agentnumber'] = $user->username;
$form->data['agentname'] = $user->name;
?>
By deleting the '&' it fixed the issue!
This topic is locked and no more replies can be posted.