I have 3 radio buttons with the same name "gender" and the values "male",
Now I want to display a saved dataset. I could set up a PHPTal variable, for
example $tpl->set("gender", $row['gender']). But I don't know how to use it.
That's why I store the dataset in an array and check it later. My radion
tal:attributes="checked php: view_Helper_isThisGenderChecked('female')"
This will call a PHP function called "view_Helper_isThisGenderChecked", which
fetch the current gender value from the dataset object and compare it with the
given value ('female' in this example) and will return true or false.
This works, but I am not happy with this.
Does anyone know a better way? Maybe a PHPTal way?
PHPTAL mailing list