[Zope] Checking types in DTML?

Rob Page rob.page@digicool.com
Thu, 23 Sep 1999 07:34:47 -0400


> <input type="checkbox" name="removeLine:list" value="6">
> <input type="checkbox" name="removeLine:list" value="7">
> <input type="checkbox" name="removeLine:list" value="8">
> 
> will allways return 'removeLine' as a list, no matter how 
> many items are
> checked.

Except if the user selects ZERO items in which case the browser usually
omits the variable (e.g., removeLine) from the REQUEST.  You need to
check for its existence first...

<dtml-if removeLine>

  <dtml-in removeLine>
    Do something here.
  </dtml-in>

<dtml-else>

Hmm.. they selected zero options

</dtml-if>

--Rob