"> Chronoforms V4 - load DB Data into Fields - Forums


Chronoforms V4 - load DB Data into Fields

henrywong10 06 Sep, 2013

I would like to load user data into form fields.

I have two links on my user menu.

Once link is edit profile and the other one is submit log.

Once user save his info via the Joomla default profile form, then I will like load the updated user data into submit log form fields.

But after user updated his profile, I could not get the updated data loaded into form fields.

I have to log out, and log in again and then only able to see the updated data.

Anyone know has clues to solve this error.

On my form, I have the following php code to load user data.
// Get user-information from Joomla
$user = &JFactory::getUser();
<div class="ccms_form_element cfdiv_text" id="email2_container_div" style=""><label for="email2">Contact Email *</label><input id="email2" maxlength="150" size="30" class=" validate['required','email']" title="" type="text" value="<?php echo $user->email; ?>" name="email2" />
<div class="clear"></div>
<div id="error-message-email"></div>
GreyHead 08 Sep, 2013
Hi henrywong10;

I'd have to guess that Joomla! doesn’t update the User Object with the new profile data until the user next logs in. You could just read the data from the profiles table I guess.

I Googled a bit and found the code on this page which looks as though it does what you need (not tested and may not work!).

This topic is locked and no more replies can be posted.