[Zope] detail record editing

ethan mindlace fremen mindlace@digicool.com
Tue, 06 Jun 2000 13:42:29 -0600


Robert Del Huerto wrote:

> +---+---------------+---------+------------+
> |   |Doe            |Jane     |$100.00     |
> +---+---------------+---------+------------+
> | X |Doe            |John     |$250.00     |
> +---+---------------+---------+------------+
> |   |Haggis         |Meister  |$100.00     |
> +---+---------------+---------+------------+
> |   |Zoper          |Doper    |$723.00     |
> +---+---------------+---------+------------+
> | +----------+  +----------+  +----------+ |
> | |   ADD    |  |  MODIFY  |  |  DELETE  | |
> | +----------+  +----------+  +----------+ |
> +------------------------------------------+

You can have as many action="submit"'s as you want.

Untested:

<input type="submit" name="add" value="1">
<input type="submit" name="modify" value="1">
<input type="submit" name="delete" value="1">

The form only submits the value of "successfull" form items, so, on your
form's action method:


<dtml-if add>
  do your adding thing
<dtml-else>
  <dtml-if modify>
    do your modifying thing
  <dtml-else>
    do your deleting thing
  </dtml-if>
</dtml-if>

~ethan @ digicool