Atomatically insert the user name

Ask your feature Requests about CKforms component

Re: Atomatically insert the user name

Postby njp » Thu Apr 08, 2010 10:38 am

Any ideas?
njp
 
Posts: 2
Joined: Thu Apr 08, 2010 9:21 am
Top

Re: Atomatically insert the user name

Postby SPABO » Sat Apr 10, 2010 2:40 pm

Would also very interested to lean howe to get userdetails from registered user in a form!!
SPABO
 
Posts: 5
Joined: Wed Mar 31, 2010 5:27 pm
Top

Re: Atomatically insert the user name

Postby amandy » Sat May 22, 2010 8:30 am

firefox have lot of plugins if you add there it can work
amandy
 
Posts: 4
Joined: Wed May 19, 2010 12:27 pm
Top

Re: Atomatically insert the user name

Postby SPABO » Sat May 22, 2010 8:46 am

Sorry all,
As this is not a standard feature within CK I'm not using it anymore
SPABO
 
Posts: 5
Joined: Wed Mar 31, 2010 5:27 pm
Top

Re: Atomatically insert the user name

Postby ouestonline » Mon Aug 09, 2010 2:09 pm

Short answer (since I wont use this component anymore)
in the template file mentioned below (default.php)
insert this code at the begining
<?php
$user=&JFactory::getUser();
?>

then find the input generation @line 247 :

<input type="text" name="<?php echo $field->name; ?>" value="<?php if ($field->name=="user") {echo $user->name;} else if(empty($this->post) ==false) {echo $this->post[$field->name];} else {echo $field->t_initvalueT;} ?>" class="<?php echo $validationclass; ?> inputbox ckCSSinput <?php if ($field->custominfo != "") {echo "ckform_tooltip".$this->ckforms->id." ckCSSTip ";}?> <?php echo $field->fieldCSSclass; ?>" <?php if ($field->readonly == "1") {echo ' readonly="true"';} ?> title="<?php echo $field->custominfo; ?>" />

of course you form must contain a field called "user" to be prefilled

:)
ouestonline
 
Posts: 3
Joined: Tue May 04, 2010 1:30 pm
Top

Previous

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron