Hi again,

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

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

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

Reply via email to