Kenneth Gonsalves wrote:
hi,
i have two radio buttons - 'yes' and 'no'. they have a name as 'fixed'. Depending on the value of 'fixed' either 'yes' or 'no' should be checked. I tried this:


<input type="radio" name="fixed" tal:condition="options/fixed" checked/>Yes <input type="radio" name="fixed" tal:condition="not:options/fixed" checked />Not Editable</p>

but doesnt work

any easy way of doing this?
You have to set the "checked"-attribute of the radiobuttons:

<input type="radio" name="fixed"
tal:attributes="checked python:test(options['fixed'], 'checked')" value="yes">YES<br>

<input type="radio" name="fixed"
tal:attributes="checked python:test(not options['fixed'], 'checked')" value="no">Not Editable<br>

Untested!

HTH,
Wolfram

_______________________________________________
ZPT mailing list
ZPT@zope.org
http://mail.zope.org/mailman/listinfo/zpt

Reply via email to