how to insert logged in user in the table form

ricalencar 18 Aug, 2011
Hi,

I have a form with some box and i'd like to put a logged in user into table form.

I can get the online user but cannot put into table when I submit the form.

Somebody can help me?

Thank's,
Ricardo.
GreyHead 19 Aug, 2011
Hi Ricardo,

ChronoForms will automatically add the user id to a table if it has a cf_user_id column.

Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.

Bob
ricalencar 23 Aug, 2011
Hi Bob,

The user id exists in my chronoform table but i'd like to show the username of the user logged.

Understand me?

Thank's.

Regards,
Ricardo.
ricalencar 23 Aug, 2011
Hi Bob,

The Joomla version is 1.6.3 and the version of chronoform is:

ChronoForms Component 4.0 RC1.9 30 May 2011
ChronoForms Module V4 RC1.8 22 Apr 2011
chronoforms Plugin V4 RC1.8 16 Apr 2011

Regards,
Ricardo.
codeslayer 30 Aug, 2011
Hi ricalencar,

To display logged in user's name.


<?php $user =& JFactory::getUser();
 
if (!$user->guest) {
  echo 'You are logged in as:<br />';
  echo 'User name: ' . $user->username . '<br />';
}
?>


I hope this what you want.

Regards
Hassan
This topic is locked and no more replies can be posted.