Is the users logged in name available to PHP code in a Chronoforms code block? I would like to know the user name so I can make some runtime changes to the form before they see it.
Thanks in advance for any info.
Hi joomlanoob,
[forumsb]getUser[/forumsb] - plenty of examples here.
Bob
Thanks! That snippet looks like exactly what I need.
<?php
$user = JFactory::getUser();
$Id = $user->id;
?>
I'll give it a try in the morning. Also looks like JFactory may be a class I should take a look at.
Hi Joomlanoob,
Yes that it (should be =& JFactory. . .) to save a bit of memory. JFactory is Joomla's Object creation class - gives you access to many of the standard Objects , User, DBO, Document, etc,
Bob
Thanks Bob!
It worked great. Started exploring JFactory and found a way to get the page title from JFactory (getDocumet ... getTitle). 🙂
Again, thanks for the tip!