Hi again,

I have in my form a field "civility" like that :

            <label>Civility</label>
            <ul>
            <li>
                <input type="radio" name="civility" value="Miss"
id="civility-miss" />
                <label for="civility-miss">Miss</label>
            </li>
            <li>
                <input type="radio" name="civility" value="Ms"
id="civility-ms" />
                <label for="civility-ms">Ms</label>
            </li>
            <li>
                <input type="radio" name="civility" value="Mr"
id="civility-mr"  />
                <label for="civility-mr">Mr</label>
            </li>
            </ul>

If the form is submitted with errors, I need to pre-fill the "civility"
field with the previous selected value.
I give the $_POST array to PHPTAL like that : $tpl->set('P', $_POST), so
I can access to this value by "P/civility"

What is the best way to have no radio-buttons selected if P/civility
doesn't exist, and to have the good radio-button selected dependant of
the value found into P/civility ?

Thanks in advance for your help !
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to