SOLVED - Problems populating fields with DB Record Loader

BNRBranding 13 Sep, 2013
I have a table that stores user info that I want to use to populate a form for the user. I have the form set up and the field names match the DB table column names. The users has to be logged in to see the form and the info is selected by the user's email address. Here is how I have the form set up now -

Custom Code Event:
Mode: Controller
Code:
<?php
$user =& JFactory::getUser();
$form->data['email'] = $user->email;
?>


DB Record Loader:
Basic
DB field: email
Table: table info is stored in
Request param: blank
Model ID: blank
Load Under Model ID: blank

Advanced
all blank

When I go to the form, the only field that is populating is the email field, which I am forcing in to the form data array to begin with. In the old tutorial there was an option to populate the fields, but that appears to be gone. What am I doing wrong?
BNRBranding 14 Sep, 2013
Ok, after some digging around it occurred to me to use the debugger event. Duh.

In any case, I thought that putting email in the DB field would be enough for the event to complete the where statement, it's not. Once I added that everything worked and the fields populated no problem.

If you are looking for a solution, this is what I added:

`email` = '<?php echo $form->data['email']; ?>'


Everything in the custom code event was fine.
This topic is locked and no more replies can be posted.