[Zope] Zope not listening to trinkets

Evan Simpson evan@4-am.com
Wed, 22 Sep 1999 19:23:24 -0500


Jason Spisak wrote:

> <input type="hidden" name="things:list" value="<!--#var
> "REQUEST['things']"-->">
>
> a hidden value that I got froma previous form (Which was also a list)
> The sequence-items show up as strings fine on the page with the above
> code, but when I try to use the hidden filed to move it to the next
> page, Zope ignores the trinket.

This is a common error, so don't feel bad <wink>.  While ':list' form
variables *produce* a single list, their values are single list elements,
not entire lists.  You *can* produce a list from a single value with
':tokens' and  ':lines' variables.

Instead of the above, do this:

<dtml-in things>
  <input type="hidden" name="things:list" value="<dtml-var sequence-item>">

</dtml-in>

or this (if your things *never* contain newlines)

<input type="hidden" name="things:lines" values="<dtml-var
"_.string.join(things, '\n')">">