O'Reilly logo

Practical Internet Groupware by Jon Udell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Docbase Form Template

A user creates a Docbase record by means of a web form. The form isn’t served statically, though. It’s generated on the fly from a template. After all that discussion in the last chapter about the virtues of dynamically generated but statically served pages, why should we generate this form? The technique helps us to constrain inputs, enforce controlled vocabularies, and divide the responsibility for completing different parts of the form among different people.

Example 6.1 shows the template for the ProductAnalysis input form.

Example 6-1. ProductAnalysis Input Form Template

<html>
<head>
<title>Product Analysis Report Form</title>
</head>

<body>

<center><b>Product Analysis Report Form</b></center>

<form method="post" action="!ACTION!">

<table cellpadding="4">

<tr>
<td align="right"><b>Assignment Date</b></td>
<td align="left">|assigndate|</td>
</tr>

<tr>
<td align="right"><b>Due Date</b></td>
<td align="left">~duedate~</td>
</tr>

<tr>
<td align="right"><b>Analyst</b></td>
<td align="left">~analyst~</td>
</tr>

<tr>
<td align="right"><b>Company</b></td>
<td align="left">~company~</td>
</tr>

<tr>
<td align="right"><b>Product</b></td>
<td align="left">~product~</td> </tr> <tr> <td align="right"><b>Title</b></td> <td align="left"><input name="title" size="40"></td> </tr> <tr> <td align="right"><b>Summary</b></td> <td align="left"><textarea name="summary" rows="2" cols="50" wrap="virtual"></textarea></td> </tr> <tr> <td align="right"><b>Full report</b></td> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required