> If ($agreement) { > > <input type="checkbox" name="agreement" value="1" checked="checked" /> > > } else { > > <input type="checkbox" name="agreement" value="1" /> > > }
Exact conversion of your code would be: <input tal:condition="agreement" type="checkbox" name="agreement" value="1" checked="checked" /> <inout tal:condition="not:agreement" type="checkbox" name="agreement" value="1" /> You could also try code like this, but if condition evaluates to false it will produce an empty argument instead of removing it completely - which is not exactly what you asked for: <input type="checkbox" name="agreement" value="1" tal:attributes="checked php: agreement ? checked : null" />
_______________________________________________ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal