I have a form, with a simple select box, and I also have a text field that pulls a value. I want to use the value in $Defaultselection
as the default value for the select options. So that if $Defaultselection
= 4 then the default selected option would be D.
Using PHP/HTML
`$Defaultselection`
contains an integer between 1-4.
<select >
<option value="1">A</option>
<option value="2">B</option>
<option value="3">C</option>
<option value="4">D</option>
</select>
That should do it:
or this other one: