Hi,
I have inserted one custom code on the form and I got this error:
And this is my custom code and this is to retrieve user data from CB profile:
This custom code is verified from one of member in CB team you can find that code from:
http://www.allmysocials.com/directory/tutorials/item/232-establishing-user-object
Strange thing is that If I use the form as a module, it is working OK but the form validation is not..
Please help me to resolve this issue. Thank you.
I have inserted one custom code on the form and I got this error:
Fatal error: Call to a member function myId() on a non-object in /home/computit/public_html/smartt/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(19) : eval()'d code on line 4
And this is my custom code and this is to retrieve user data from CB profile:
<?php
Global $_CB_framework;
$myId = $_CB_framework->myId();
$cbUser =& CBuser::getInstance( $myId );
if ( ! $cbUser ) {
$cbUser =& CBuser::getInstance( null );
}
$user =& $cbUser->getUserData();
$name = $cbUser->getField('cb_company');
$mobile = $cbUser->getField('cb_mobile');
?>
This custom code is verified from one of member in CB team you can find that code from:
http://www.allmysocials.com/directory/tutorials/item/232-establishing-user-object
Strange thing is that If I use the form as a module, it is working OK but the form validation is not..
Please help me to resolve this issue. Thank you.