[Zope] Form Help
Todd Loomis
tloomis@dmso.mil
Wed, 20 Feb 2002 13:12:25 -0500
Hi all:
Problem: When a user submits a form I look in my database to if the email
they enter has already been recorded. If so I want to redirect the back to
the form with a inputs filled in informing them about the error. If the
email has been added before recorded the data and show conformation. I can
get the error to go back to the form and place inputs back in the form,
however the form want submit if all is well:
This is the basic code:
<dtml-if submit>
<dtml-in duplicate> ##CHECK FOR DUP###
<dtml-if "email1==EMail">
<SCRIPT FOR=window EVENT=onload LANGUAGE="JScript">
alert("The E-Mail address you entered is already in use, please
provide another.");
</SCRIPT>
<dtml-var form>##PULL IN FORM FILL IN INPUTS WITH IF STATMENTS##
<dtml-else">
<dtml-call add>
<dtml-in userid>
<dtml-call status>
<p>Your registration request has been submitted for review.</p>
</dtml-in>
</dtml-if>
</dtml-in>
<dtml-else>
<dtml-var form>##PULL IN BLANK FORM##
</dtml-if>
Can this be fixed or a different way.
Thanks,
Todd