Zope
  Home arrow Zope arrow Form Processing With Zope
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ZOPE

Form Processing With Zope
By: Team Melonfire, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 10
    2002-02-26

    Table of Contents:
  • Form Processing With Zope
  • Driving Under The Influence
  • Stringing Things Along
  • Running On Empty
  • In The Raw
  • You've Got Mail!
  • Endgame

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Minimize the cost of deploying database applications. Advantage Database Server or Microsoft SQL Server – Which One is Right for You? Learn now!

    Form Processing With Zope
    (Page 1 of 7 )

    Ever wondered how to create and process HTML forms in the Zope environment? Relax. It's simpler than you think. The thing about Zope is, everyone wants to use it, but most people don't know where to start.

    Take, for example, something as simple as building a feedback form. For a PHP or Perl developer, this is a doddle, requiring no more than a couple hours of development time (OK, OK, a little more if it requires complex validation or processing). Building a feedback form in PHP or Perl is neither scary or intimidating; in fact, it's one of the most fundamental things a Web developer needs to know to consider himself even reasonably proficient in the language.

    Put that same PHP or Perl developer on a Zope-based platform, however, and the sweat will really start trickling. Zope's object-oriented approach to everything tends to confuse even the most versatile PHP or Perl programmer, and you can expect that one hour to telescope into a couple of days, as our fearless programmer struggles to master the intricacies of Zope objects, variables and methods.

    In case you ever find yourself in this situation, you're going to be glad you found this article. Over the next few pages, I'm going to give you a broad overview of the process of building and processing Zope forms, demonstrating how simple and painless the process really is.

    I'll be assuming that you know the basics of Zope - variables, and the like - and that you have a Zope 2.50 system up and running. {mospagebreak title=Making New Friends} We'll start with something simple, a form with three fields and a form processor that displays the data entered into the form.

    The first step is to create a couple of DTML Document objects (via the Zope Management Interface, usually available at http://your_zope_server:8080/your_folder/manage) to represent these two items. I've called them Form and FormProcessor respectively; feel free to name them whatever you want.

    First, let's look at the Form object:

    <dtml-var standard_html_header> <form action="FormProcessor" method="POST"> Species: <br> <input name="species"> <p> Home planet: <br> <input name="planet"> <p> Distance (light years) from Earth: <br> <input name="distance"> <p> <input type="Submit" value="Beam Me Up, Scotty"> </form> <dtml-var standard_html_footer>
    This isn't very hard to read, even if you've never worked with Zope before. It's a standard HTML form, with DTML statements embedded within it (much like a PHP script, which has PHP commands embedded within the markup).

    If you have some familiarity with Zope, you'll already know about the HTML header and footer objects; they are generic objects that can be used to place a standard header and footer on every page. Enclosed within these is a regular HTML form, albeit one which references another DTML Document when submitted. This DTML Document is named FormProcessor, and it's going to handle the task of processing the data entered into the form by the user.

    <form action="FormProcessor" method="POST"> ... </form>
    Here's what the form looks like:

    More Zope Articles
    More By Team Melonfire, (c) Melonfire


     

       

    ZOPE ARTICLES

    - Creating Zope Products
    - Plone Content Types With Archetypes
    - Flat User Management in Zope
    - Creating Basic Zope Applications
    - Getting started with Zope for Linux and Sola...
    - ZPT Basics (part 4)
    - ZPT Basics (part 3)
    - ZPT Basics (part 2)
    - ZPT Basics (part 1)
    - Exception Handling In DTML
    - DTML Basics (part 4)
    - DTML Basics (part 3)
    - DTML Basics (part 2)
    - DTML Basics (part 1)
    - Using Zope With Apache

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway