I have been trying for a long time how to do Autofill for logged in members in forms. When I finally got it from another post, it worked but it wont save it, I cant see it on the emails or databases, and if I make the textbox required and disable the form says it's empty when its clearly not. This is the code I am currently using.
<?php
$user =& JFactory::getUser();
$form->data['id'] = $user->id;
$form->data['email'] = $user->email;
$form->data['name'] = $user->name;
$form->data['username'] = $user->username;
?>
<?php
$user =& JFactory::getUser();
$form->data['id'] = $user->id;
$form->data['email'] = $user->email;
$form->data['name'] = $user->name;
$form->data['username'] = $user->username;
?>