[Zope] dtml-sqlvar type="int" optional

Mike Doanh Tran mtran@shufflemasterrd.com
Mon, 26 Aug 2002 14:11:57 -0600


I have an optional field name "zipcode" in  my form whose type is 
an integer. I keep getting an Error:  "Invalid integer value for zipcode"
whenever this field is not fill out by the user.

Here's my form name and ZSQL Method:

<input type="text" name="zipcode"  size="5">

ZSQL Method:

<dtml-sqlvar zipcode type="int" optional>


mysql> describe profiles zipcode;
+---------+--------------+------+-----+---------+-------+
| Field   | Type         | Null | Key | Default | Extra |
+---------+--------------+------+-----+---------+-------+
| zipcode | mediumint(5) | YES  |     | NULL    |       |
+---------+--------------+------+-----+---------+-------+
1 row in set (0.00 sec)

The "optional" arguement in the <dtml-sqlvar zipcode> should not
even rendered if zipcode was blank right?
Does anyone have any ideas on how I can make this work?


Thanks in advance for any comments,

Mike


--