[Petal] decode selected trouble

Raymond Barkhouse raymond at print-quotes-software.com
Thu Nov 10 17:33:47 GMT 2005


On Wed, 2005-09-11 at 13:11 -0500, Josh Narins wrote:
> Dear Petal List,
> 
> I've got this in my template:
> 
> <option petal:repeat="o options" 
>         petal:attributes="value string:${o/id}; selected decode: o/selected 1 'selected'">

I use "selected decode:foo 1 'selected' nothing" to stop the attribute
from appearing at all when it's not selected (as needed for HTML).




More information about the Petal mailing list