alinford Posted January 14, 2012 Share Posted January 14, 2012 On the clientarea.php?action=contacts page, when I choose the contact I want to view from the dropdown, it goes to that contact, but then the dropdown field defaults back to the first contact on the list. I would like the dropdown to show whatever contact I have chosen, and not default back to to the first contact. Normally, I would use the "Selected" tag to choose a selected option, but I do not know how to use "Selected" as a variable, and show the current contact. Any idea how I can accomplish this? I am using the "Default" template on V5. Here is the code I am currently using: <form method="post" action="{$smarty.server.PHP_SELF}?action=contacts"> <div class="alert-message block-message info"> <p>{$LANG.clientareachoosecontact}: <select name="contactid" onchange="submit()"> {foreach item=contact from=$contacts} <option value="{$contact.id}">{$contact.name} - {$contact.email}</option> {/foreach} <option value="new">{$LANG.clientareanavaddcontact}</option> </select> <input class="btn" type="submit" value="{$LANG.go}" /></p> </div> </form> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.