Welcome Guest, Not a member yet? Register   Sign In
Set select problem after form validation
#2

[eluser]gtech[/eluser]
this is the set_select in the validation code
Code:
function set_select($field = '', $value = '')
    {
        if ($field == '' OR $value == '' OR  ! isset($_POST[$field]))
        {
            return '';
        }
            
        if ($_POST[$field] == $value)
        {
            return ' selected="selected"';
        }
    }

so quick check when the form is displayed, view source on the browser and see if you get the ' selected="selected" ' appear in your desired option. If not you could just echo $_POST['BirthYear'] on the form page and see what it is set to, it might help you debug the problem.


Messages In This Thread
Set select problem after form validation - by El Forum - 06-09-2008, 01:51 PM
Set select problem after form validation - by El Forum - 06-09-2008, 04:10 PM
Set select problem after form validation - by El Forum - 06-09-2008, 06:02 PM
Set select problem after form validation - by El Forum - 06-09-2008, 06:14 PM
Set select problem after form validation - by El Forum - 06-09-2008, 06:19 PM
Set select problem after form validation - by El Forum - 06-09-2008, 06:22 PM
Set select problem after form validation - by El Forum - 09-01-2008, 01:52 AM
Set select problem after form validation - by El Forum - 09-01-2008, 02:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB