CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 CCGetUserLogin() example?

Print topic Send  topic

Author Message
rabbtux

Posts: 5
Posted: 09/18/2008, 9:31 PM

I have a form for user comments and would like the username filled in automatically when a logged in user submits their comments. I think this function gets called as an event on the form, or the hidden text box?? Sorry for the Noob type question, I just couldn't find a good example, or maybe it too late in the evening. :-<

Thanks,
Marshall
View profile  Send private message
chriscripps

Posts: 30
Posted: 09/19/2008, 3:34 AM

Here is what I do to get these:

Put a hidden textbox on the form. In the textbox before show event, I add custom code as follows:

$user = CCGetUserId();
$Container->NameOfTextBox->SetValue($user);

I often use $user for other things as well, so keep it separate. You could probably do the same with one line:

$Container->NameOfTextBox->SetValue(CCGetUserId());

Chris
View profile  Send private message
datadoit
Posted: 09/19/2008, 5:46 AM

For your username control, under properties, put this in as the Default
Value: CCGetUserLogin()

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.