Registered Username in Form Field (Text) Predefined
Permalink
Hi,
is there a way to modify C5 Form Block in order to display a textfield with the username as default. The users are all registered!
I want this because entries should be marked with the username and saved on the database besides the other informations.
Please help me with any idea or hints.
Thanks in adavanced.
Omar
is there a way to modify C5 Form Block in order to display a textfield with the username as default. The users are all registered!
I want this because entries should be marked with the username and saved on the database besides the other informations.
Please help me with any idea or hints.
Thanks in adavanced.
Omar
Yes I know a bit how to use custom templates, but I don't know how to make one textfield default text the users name.
When you build the custom template, you could grab the current user from this variable:
And then just put that php variable into the value property of the text input:
$uName = $u->uName;
And then just put that php variable into the value property of the text input:
<input name="username" type="text" value="<?php echo $uName; ?>" />
Do you know how to do custom templates?