Re: checking radio buttons
Wolfram Kraus <[email protected]> Thu, 23 Jun 2005 15:05:39 +0200
| Newsgroups | gmane.comp.web.zope.page-templates |
|---|---|
| Message-ID | <[email protected]> |
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