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
|
 |
 |
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
|
 |
 |
datadoit
|
| Posted: 09/19/2008, 5:46 AM |
|
For your username control, under properties, put this in as the Default
Value: CCGetUserLogin()
|
|
|
 |
|