Now I was thinking to use tal:attributes="checked x" something like that to be sure that it the item is checked after the checking submit the form.

Is this totally wrong way to get my idea to work?

Sounds OK. PHPTAL understands boolean attributes like checked and selected, so if you get x to be truthy/falsy, it will work.

Reading session directly in the template is probably a stretch, but you could do something like:

$phptal->favorite_checked = $_SESSION[...];

regards, Kornel Lesiński

PHPTAL mailing list

Reply via email to