I am having a bit of trouble getting an updated form to fill out with the array of user names. To see the correct bit in action, please go here: [removed link]
As you can see when the page completes loading, there is an option for “Mortgage Advisor“ which is pre-loaded with the user’s name. This user’s name is associated with the agentId
value that you see in the URL.
I am upgrading this site to joomla 2.5 and when I copy over this bit of code on to add the drop-down menu to the form, it does not pick up the list:
<tr>
<td><?php echo JText::_('RSM_FORM_TXT_AGENT'); ?>:</td>
<td>
<select name="userId" id="userId">
<option value="" <?php if($row->userId == ""){echo " selected='selected'";} ?>></option>
<?php foreach($agents as $agent){
$agents = $database->loadObjectList();
?> <option value='<?php echo $agent->id; ?>' <?php if($_GET['agentId'] == $agent->id){echo "selected='selected'";} ?> ><?php echo $agent->firstname; ?> <?php echo $agent->lastname; ?></option>
<?php }?>
</select>
</td>
</tr>
This is copied over from the 1.5 joomla site example, but like I said before it is not sending the value over. You can see an example of this output here:
[removed link]
Any idea on how I can pick up the values to then pass on after submit button click? Also, could it be that I have missed another area which is connected to this value? Thanks.