CodeIgniter Forums
Repop on dynamic form select not working - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Repop on dynamic form select not working (/showthread.php?tid=26576)



Repop on dynamic form select not working - El Forum - 01-17-2010

[eluser]RJ[/eluser]
Hello,

Using the code below to generate select drop down, trying to get the form to hold values if validation doesn't complete, can not get it to work, any thoughts?

Code:
<select name="fday">
            &lt;?php for($d=1;$d <= 31; $d++): ?&gt;
                <option value="&lt;?php echo $d; ?&gt;" &lt;?php echo set_select('fday', "$d"); ?&gt;>&lt;?php echo $d; ?&gt;</option>
            &lt;?php endfor; ?&gt;
        </select>



Repop on dynamic form select not working - El Forum - 01-18-2010

[eluser]flaky[/eluser]
If I'm not wrong you need an option with empty value.