Re: Associated Values from HTML forms
Thank you. I have another question: How do I get checkbox and associated data from a selection box located next to the checkbox? The HTML form does not allow me to store a dictionary with keys. Does it? Thanks a lot for your help. Enrica
From: Dennis Allison <allison@sumeru.stanford.EDU> To: enrica dente <enrica_dente@hotmail.com> CC: zodb-dev@zope.org, zope-it@zope.org, help@zope.org, Zope@zope.org Subject: Re: [Zope] Help with String conversion in Zope Date: Thu, 12 Jun 2003 06:54:59 -0700 (PDT)
<dtml-if expr="_.same_type(standardkit_cost, 'Test')"> ^^ You need to specify the name space.
On Thu, 12 Jun 2003, enrica dente wrote:
Dear all,
I have a problem checking if an input from a form is a string or not and then change it into a float. The Zope code I have written is as follows but it does not work.
<dtml-if expr="same_type(standardkit_cost, 'Test')"> <dtml-call "REQUEST.set ('standardkit_cost', _.float(standardkit_cost))">
</dtml-if>
_________________________________________________________________ Sign-up for a FREE BT Broadband connection today! http://www.msn.co.uk/specials/btbroadband
enrica dente wrote at 2003-6-12 17:52 +0000:
How do I get checkbox and associated data from a selection box located next to the checkbox?
What? Zope does not (easily) know the layout of your form. Therefore, it does not have the notion of "next to a checkbox". Instead, each form control has a name and Zope can access the value of most form controls via its name (there are exceptions: unchecked checkboxes (e.g.) are not included in the submitted form data and Zope is unable to determine whether the checkbox was not there at all or wether it was not checked). You find more details (and some tips how to handle the exceptional cases) in <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Dieter
participants (2)
-
Dieter Maurer -
enrica dente