Hello,
I am creating a form and for the name and email address textboxes, I would like to auto-populate those boxes.
E.g.: User1 log-ins and would like to submit a form. When the form appears - the user's name and email address are already entered in the textboxes on-screen.
Is there a way to do this?
I am new to Joomla and chronoforms - I am using v3 and I also have XAMPP (php) if this helps.
Any help is appreciated!!
Many Thanks!!!
I am creating a form and for the name and email address textboxes, I would like to auto-populate those boxes.
E.g.: User1 log-ins and would like to submit a form. When the form appears - the user's name and email address are already entered in the textboxes on-screen.
Is there a way to do this?
I am new to Joomla and chronoforms - I am using v3 and I also have XAMPP (php) if this helps.
Any help is appreciated!!
Many Thanks!!!
Hi MTP,
If you check the posts from last week I think there was a thread on doing just this using the 'DB Record Loader' action.
Bob
If you check the posts from last week I think there was a thread on doing just this using the 'DB Record Loader' action.
Bob
Hi,
thanks for the reply. Can you give me the link to the thread as I cannot seem to find it and for the DB record Loader, do I need v4? If yes, does the upgrade to v4 affect the form I made in v3.1 and if no, whereabouts can I create a DB record loader?
Many Thanks!!!
thanks for the reply. Can you give me the link to the thread as I cannot seem to find it and for the DB record Loader, do I need v4? If yes, does the upgrade to v4 affect the form I made in v3.1 and if no, whereabouts can I create a DB record loader?
Many Thanks!!!
Hi MTP,
My apologies, I was catching up after a few days away yesterday and missed that you were using CFv3.
You can use the Joomla! User object to get the info you need. In the form HTML
Bob
My apologies, I was catching up after a few days away yesterday and missed that you were using CFv3.
You can use the Joomla! User object to get the info you need. In the form HTML
<?php
$user =& JFactory::getUser();
?>
. . .
<input type='text' name='name' id='name' value='<?php echo $user->name; ?>' />
. . .
<input type='text' name='email' id='email' value='<?php echo $user->email; ?>' />
Bob
Hello,
Thank you for your reply.
Thank you very much for the coding you posted it has really helped and has displayed the name of the user.
For the user's name in the box, is there a way for the name not to be amended - it cannot be deleted or renamed by anyone - it will only display the user logged in and if someone were to change it, it would display wrong username etc.
If you do not understand please let me know
Sorry I am not familiar with php and chronoforms.
Many Thanks!!
Thank you for your reply.
Thank you very much for the coding you posted it has really helped and has displayed the name of the user.
For the user's name in the box, is there a way for the name not to be amended - it cannot be deleted or renamed by anyone - it will only display the user logged in and if someone were to change it, it would display wrong username etc.
If you do not understand please let me know
Sorry I am not familiar with php and chronoforms.
Many Thanks!!
Hi MTP,
You can just display the value without using an input:
Bob
You can just display the value without using an input:
<div><?php echo $user->name; ?></div>
Bob
This topic is locked and no more replies can be posted.