Hi,
I have a hiddenfield with name in the form - default value <?php echo $user->name; ?>
A custom code before showhtml with:
<?php
$user =& JFactory::getUser();
$form->data['name'] = $user->name;
?>
Now i need a second field with the phone number -
the same with phone instead name does not work - i think because of the other table?
How can i do that correctly?
I have a hiddenfield with name in the form - default value <?php echo $user->name; ?>
A custom code before showhtml with:
<?php
$user =& JFactory::getUser();
$form->data['name'] = $user->name;
?>
Now i need a second field with the phone number -
the same with phone instead name does not work - i think because of the other table?
How can i do that correctly?
Hi outbreak198x,
The User object will only get you info from the jos_users table. If the phone number is in a different table you can use a DB Record Loader action to get it. Presumably it's linked to the User id?
Bob
The User object will only get you info from the jos_users table. If the phone number is in a different table you can use a DB Record Loader action to get it. Presumably it's linked to the User id?
Bob
i'll try it, but i am a real noob @coding
This topic is locked and no more replies can be posted.
