Hi,

I actually went ahead and did what what Ken did, I will have a look it
how Johnathan implemented it.

<table cellspacing=5>
% for item in c.list:
<tr>
   <td>
       ${item.description}
   </td>
   <td>
       $item.price}
   </td>
   <td>
       <input type="checkbox" name=$item.description value=
$item.description/>
   </td>
</tr>

When  posting to an action in the controller. How does it get the
values of the checkboxes?

Much appreciated,
garyc




On Oct 12, 10:17 am, Jonathan Vanasco <[email protected]> wrote:
> the simplest:
>
> <td>
>        ${h.check_box('fieldname')}
> </td>
>
> it looks like it was changed a bit though to:
>     checkbox(name, value=’1’, checked=False, label=None, **attrs)
>
> when looping things like Ken suggested, i like to do stuff like this:
>
> % for id in list:
> <%
>     checked= ''
>     if test:
>         checked= ' checked="checked"'
> %>
>    <input name="checks" value="${id}"${checked}/>
> %endfor
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to