View Single Post
  #10  
Old 01-13-2009, 12:15 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Retaining selected Item in dropdown menu

You didn't pass the active make to template once again.
The code you have posted is not enough so I used sources posted above

insert below the line
$smarty->assign("makes", $makes);
this one
Code:
$smarty->assign("make", $make);

and in tpl:
Code:
<select name="make" style="width: 90%;" onchange="javascript:document.mmysearchform.submit ();"{if $year == ''} disabled="disabled"{/if}> <option value="" {if $make ne ''}selected="selected"{/if}>Select Make</option> {foreach item=make from=$makes} <option value="{$make.makeid}"{if $make.makeid eq $make} selected="selected"{/if}>{$make.makename}</option> {/foreach} </select>

I used to take the sheet of paper and make a draft when something is unclear.
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote