Hidden field with a list type
Hi Zopians. My problem is how can I make a hidden field to be a list with a default value? For instance, I try to make the following. REQUEST.form['pno'] contains ['abc', 'def', 'ghi'] <snip> <input type=hidden name="pno:list" value="<!--#var "REQUEST.form['pno']"-->"> When I submit the above page, and try to refer to pno, it doesn't produce the result I want. For example: <snip> <!--#in "REQUEST.form['pno']"--> <!--#var sequence-item--><BR> <!--#/in--> produces only 1 item, "['abc', 'def', 'ghi']" and not 3 items, abc def ghi Thanks for any comments, --Paul
Paul Chung Chee Soong wrote:
Hi Zopians. My problem is how can I make a hidden field to be a list with a default value? For instance, I try to make the following.
REQUEST.form['pno'] contains ['abc', 'def', 'ghi']
<snip> <input type=hidden name="pno:list" value="<!--#var "REQUEST.form['pno']"-->">
You may try <input type=hidden name="pno:tokens" value="<!--#var "join(REQUEST.form['pno'])"-->">
When I submit the above page, and try to refer to pno, it doesn't produce the result I want. For example:
<snip> <!--#in "REQUEST.form['pno']"--> <!--#var sequence-item--><BR> <!--#/in-->
produces only 1 item, "['abc', 'def', 'ghi']" and not 3 items, abc def ghi
Thanks for any comments,
--Paul
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Paul Chung Chee Soong wrote:
Hi Zopians. My problem is how can I make a hidden field to be a list with a default value? For instance, I try to make the following.
REQUEST.form['pno'] contains ['abc', 'def', 'ghi']
<snip> <input type=hidden name="pno:list" value="<!--#var "REQUEST.form['pno']"-->">
When I submit the above page, and try to refer to pno, it doesn't produce the result I want. For example:
<snip> <!--#in "REQUEST.form['pno']"--> <!--#var sequence-item--><BR> <!--#/in-->
You want: <!--#in "REQUEST.form['pno']"--> <input type=hidden name="pno:list" value="<!--#var sequence-item-->"> <!--#/in--> Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (3)
-
Hannu Krosing -
HCSCCSï¼ prudential.com.my -
Jim Fulton