Welcome Guest, Not a member yet? Register   Sign In
set_value and select boxes
#1

[eluser]tim1965[/eluser]
Hi

I am having a problem with using set_value to pre-populate an update form on the initial load i.e. the initial db lookup to populate the fields. I cannot seem to get any of my select boxes to display the db value.
On the select it defaults to the initial option value, rather than Mr whch is what the query is returning as var $title
Quote:
<select name="title" id="title" value="&lt;?php echo set_value('title',$title); ?&gt;" class="combo">
<option value="">--Please select--</option>
<option value="Mrs"&lt;?php echo set_select('title', 'Mrs'); ?&gt;>Mrs</option>
<option valuwd="Miss"&lt;?php echo set_select('title', 'Miss'); ?&gt;>Miss</option>
<option value="Ms"&lt;?php echo set_select('title', 'Ms'); ?&gt;>Ms</option>
<option value="Mr"&lt;?php echo set_select('title', 'Mr'); ?&gt; >Mr</option>
</select>
Quote:

I have also tried echoing $title directly as a value and this doesnt work.
set_value is working correctly for all fields other than select´s.
I have set validation for these fields as required and this is working correctly for selectds.
Any help appreciated


Messages In This Thread
set_value and select boxes - by El Forum - 08-17-2009, 07:00 AM
set_value and select boxes - by El Forum - 08-17-2009, 08:12 AM
set_value and select boxes - by El Forum - 08-17-2009, 09:09 AM
set_value and select boxes - by El Forum - 08-17-2009, 09:25 AM
set_value and select boxes - by El Forum - 08-17-2009, 09:51 AM
set_value and select boxes - by El Forum - 08-17-2009, 12:26 PM
set_value and select boxes - by El Forum - 08-18-2009, 12:06 AM
set_value and select boxes - by El Forum - 08-18-2009, 01:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB