Once again, mind block: I would like to pass through a list called roles (built from a previous screen list box). I tried this: <input type='hidden' name='roles:list' value='<!--#var roles-->'> but the result is: ['['] It should be: ['resale', 'salesRep'] I verified that the variable "roles" actually contains ['resale', 'salesRep'] by displaying: <dtml-var roles> Any thoughts as to what I'm missing????? DR
Once again, mind block:
I would like to pass through a list called roles (built from a previous screen list box). I tried this: <input type='hidden' name='roles:list' value='<!--#var roles-->'>
but the result is: ['[']
It should be: ['resale', 'salesRep']
I verified that the variable "roles" actually contains ['resale', 'salesRep'] by displaying: <dtml-var roles>
Any thoughts as to what I'm missing?????
DR
You'll have to use something like : <input type='hidden' name='roles:list' value='[<dtml-in roles><dtml-var sequence-item>,</dtml-in>]'> This might not be the optimal way of doing it, but it will return the result you want.. AlexR has also written a nice how-to on lists . You can find it on : http://www.zope.org/Members/AlexR/SelectionLists ------------------------------------------------ Geir B Hansen geirh@funcom.com Web-designer / Graphic artist Funcom Oslo http://www.funcom.com ------------------------------------------------
Hello Daniel, Wednesday, December 15, 1999, 11:23:41 PM, you wrote: DGR> I would like to pass through a list called roles (built from a previous DGR> screen list box). I tried this: DGR> <input type='hidden' name='roles:list' value='<!--#var roles-->'> DGR> but the result is: ['['] DGR> It should be: ['resale', 'salesRep'] DGR> I verified that the variable "roles" actually contains ['resale', DGR> 'salesRep'] DGR> by displaying: <dtml-var roles> DGR> Any thoughts as to what I'm missing????? If you want to pass along a hidden list proerty, you'll have three options: 1. Pass it along as a list of hidden fields with the :list modifier, Zope will reassemble the list: <dtml-in roles> <input type=hidden name="roles:list" value="&dtml-sequence-item;"> </dtml-in> 2. Turn the list into a space-seperated token property. This only works if there are never any spaces in your list items: <dtml-let tokens="_.string.join(roles)"> <input type=hidden name="roles:tokens" value="&dtml-tokens;"> </dtml-let> 3. Turn the list into a newline-seperated lines property. This only works if there are never any newlines in your list items: <dtml-let lines="_.string.join(roles, '\n')"> <input type=hidden name="roles:lines" value="&dtml-lines;"> </dtml-let> Warning: this is from the top of my head, YMMV. -- Best regards, Martijn mailto:mj@digicool.com
participants (3)
-
Daniel G. Rusch -
Geir B Hansen -
Martijn Pieters