Re: [Zope] Validating page entry help

2000-06-22 Thread Graham Chiu

In article [EMAIL PROTECTED]
, Stuart Foster [EMAIL PROTECTED] writes
1. What is the best way to do page validation before it is submited. 
2. If the way I am doing it seems to be an ok way, how do I go BACK with out
losing everything (equivalent of pressing the back button)

Stuart Foster
MediServe Information Systems

Never go back - always go forward!

http://www.zope.com/Members/gchiu/

Explanation of one way to build bullet proof data entry forms

-- 
Regards,  Graham Chiu
gchiuatcompkarori.co.nz
http://www.compkarori.co.nz/index.php
Powered by Interbase and Zope

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Validating page entry help

2000-06-21 Thread J. Atwood

I find the best way is to do dtml-if itemdtml-var itemdtml-else*
needed/dtml-if on the fields of the form and have dtml-try trying to do
something with all the values (email, write, update database). If they are
not all there it brings you back the the form (I always build it in one
method which makes it easier).

Examples:
http://market.gotschool.com/register.html?type=school - in production so
leave out your email

http://fundraising.gotschool.com/tell_a_friend.html


J



 From: Stuart Foster [EMAIL PROTECTED]
 Date: Wed, 21 Jun 2000 10:39:48 -0700
 To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED]
 Subject: [Zope] Validating page entry help
 
 I was wondering what the best way to validate a users input on a page.
 
 Currently I submit a page to an interim page that checks for certain values
 using dtml-if's and dtml-unless'.
 If everything is fine I go on to the next page. If something is missing I
 need to go back, I haven't figured out how to do this part.
 If I use META HTTP-EQUIV="refresh" content=5;URL=dtml-var
 "REQUEST['HTTP_REFERER']" all the input is lost from the form.
 
 So my questions are:
 
 1. What is the best way to do page validation before it is submited.
 2. If the way I am doing it seems to be an ok way, how do I go BACK with out
 losing everything (equivalent of pressing the back button)
 
 Stuart Foster
 MediServe Information Systems
 
 http://www.mediserve.com
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )