[Petal] How do I use selected/checked ?

Jonathan Vanasco jvanasco at mastersofbranding.com
Wed Aug 31 18:38:14 BST 2005


Thanks.  That's way better.

I just realized that when doing 2 loops as in the other example on a 
select, my select options  are not the same for a virgin form and a 
selected form
It's also ugly on the html document to do radio boxes / checkboxes (2 
of each)


On Aug 31, 2005, at 11:30 AM, wsmith wrote:

> If you get the decode: modifier from Petal::Utils, you can keep it in
> one:
>
> <input type="checkbox" petal:attributes="checked decode: 
> myinput/checked
> 1 1" />
>
> This reads:
> If the value of myinput/checked is exactly 1, set the checked 
> attribute.
> Otherwise, do not set it.



More information about the Petal mailing list