[Zope] Problem w/ form writing to database
Terry McKenna
terry_a_mckenna@yahoo.com
Mon, 9 Jul 2001 17:55:46 -0700 (PDT)
I am trying to build a Help Desk Trouble Ticket
tracking system. I want to use a web based form to
allow customers to enter trouble tickets. The problem
I am having is that when I submit the form, the zope
development environment pulls up its native database
"test" form instead of making an entry in the
database. It seems I can only enter data to my
external database through the Zope "test" form. Any
ideas?
---------------------------------------------------
"submitTicket" method:
<form action="troubleTicket/newTicket" method="get">
<table>
<tr>
<th align=right>Name:
<td><input type="text" name="name" size=32>
<tr>
<th align=right>Phone:
<td><input type="text" name="phone" size=10>
<tr>
<th align=right>E-Mail:
<td><input type="text" name"email" size=32>
<tr>
<th aligh=right>App:
<td><select name="app">
<option>N/A
<option>Servie Inquiry
<option>Idea DataMart
<option>Siebel Smart Serve
<option>S4 Operations
</select>
<tr>
<th aligh=right>Server:
<td><select name="server">
<option>N/A
<option>caycom3
<option>caycom4
<option>caydec1
<option>caydec2
<option>cosclim1
<option>cossi01
<option>cspcom1
<option>cspcom2
<option>cspsie05
<option>norsi01
<option>omzdie06
<option>omzsie07
<option>omzsie09
<option>s4reports
<option>system2
</select>
<tr>
<th align=right>Priority:
<td><select name="pri">
<option>4
<option>3
<option>2
<option>1
</select>
</table>
<table>
<tr>
<td> 1 = 1 hr response
<tr>
<td> 2 = 4 hr response
<tr>
<td> 3 = 24 hr response
<tr>
<td> 4 = 72 hr response
</table>
<p><h4>Description of Problem:</h4>
<textarea name="description" cols="37" rows="5">
</textarea>
<p><input type="submit" name="submit" value="
Submit "
</form>
---------------------------------------------------------------
Z SQL method "newTicket":
insert into ticket3 values
(<dtml-sqlvar ticketNum type="int" optional>,
<dtml-sqlvar name type="string">,
<dtml-sqlvar phone type="string">,
<dtml-sqlvar email type="string">,
<dtml-sqlvar app type="string">,
<dtml-sqlvar server type="string">,
<dtml-sqlvar priority type="int">,
<dtml-sqlvar problem type="string">)
--------------------------------------------------------------
submitTicket calls newTicket. I think submitTicket
passes the values entered by the user on the form to
newTicket. I thought that should be enough for
NewTicket to make an entry in the database but the
Zope "test" interface populates the screen when I hit
submit.
-Thanks in advance.
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/