http://www.chebucto.ns.ca/cgi-bin/genform (fwd)

Date: Mon, 3 Jan 2000 15:54:03 -0400 (AST)
From: Michael Smith <michael@csuite.ns.ca>
To: ccn-ip@chebucto.ns.ca, ccn-ipe@chebucto.ns.ca
Precedence: bulk
Return-Path: <ccn-ip-mml-owner@chebucto.ns.ca>

next message in archive
no next message in thread
previous message in archive
Index of Subjects


Guess I forgot to announce this outside Tech. CCN now has a generic form
collector-mailer (similar functionality to FormMail).

---------- Forwarded message ----------
Date: Tue, 30 Nov 1999 21:55:27 -0400 (AST)
From: Michael Smith <michael@csuite.ns.ca>
To: CCN Tech <ccn-tech@chebucto.ns.ca>
Cc: jnewman@hfx.andara.com, Chris Majka <aa051@chebucto.ns.ca>
Subject: http://www.chebucto.ns.ca/cgi-bin/genform

A generic form collector-mailer is now in testing.

I adapted it from Bignosebird's bnbform.cgi v3.0 (took out a lot of cruft
that didn't apply, and cleaned up or added some stuff).

When mailing a form, it checks all recipient addresses to make sure
they're in the localnames file (i.e. chebucto.ns.ca or one of our VDNs).

When creating a form, set a few special <input type="hidden" ...> fields.

############## SPECIAL FORM VARIABLES ############################
#required:    comma delimited list of required entry fields
#data_order:  comma delimited list indicating what fields to actually
#             print and in what order.
#ok_url:      URL to go to if successful
#not_ok_url   URL to go to if unsuccessful
#submit_to:   email address of person to input receive data by mail
#cc_to:       email address of Cc Recipient
#submit_by:   email address of person completing form
#autorespond: if yes, then send confirmation to submitter
#automessage: text to print for autoconfirmation e-mail
#form_id:     name of form for e-mail subject
##################################################################

data_order is the only required field, but nothing useful will happen if
submit_to and (ok_url and not_ok_url) or (autorespond and automessage) are
not set.

Here's a useless sample form.

<form method="post" action="/cgi-bin/genform">
<input type="hidden" name="ok_url" value="http://www.chebucto.ns.ca">
<input type="hidden" name="not_ok_url" value="http://www.anchordesk.com">
<input type="hidden" name="submit_to" value="michael@chebucto.ns.ca">
<input type="hidden" name="cc_to" value="michael@pentagram.nslug.ns.ca">
<input type="hidden" name="form_id" value="test0">
<input type="hidden" name="autorespond" value="yes">
<input type="hidden" name="automessage" value="hi_automessage">
<input type="hidden" name="data_order" value="field1,field0">

<input type="text" name="field0" value="munky is missing a finger"><br>
<input type="checkbox" name="field1"> Is he?<br>
<input type="text" name="submit_by" value="michael@csuite.ns.ca"><br>
<input type="submit" value="Yeah">
</form>

The message will not be cc'd to michael@pentagram.nslug.ns.ca and
michael@csuite.ns.ca will not get a confirmation autoresponse because
pentagram & csuite are not in
/csuite/zmailer/db/localnames. michael@chebucto.ns.ca will get this:

Received: from halifax.chebucto.ns.ca (halifax [192.75.95.75])
	by pentagram.nslug.ns.ca (Postfix) with ESMTP id EB0391863
	for <moses@pentagram.nslug.ns.ca>; Tue, 30 Nov 1999 21:51:53 -0400 (AST)
Received: by halifax.chebucto.ns.ca id <S35384AbPLABvj>; Tue,
     30 Nov 1999 21:51:39 -0400
To: michael@chebucto.ns.ca
From: michael@csuite.ns.ca
X-Mailer: Chebucto Community Net genform
	based on Bignosebird.com bnbform v3.0
X-Abuse: Contact abuse@chebucto.ns.ca
X-Originating-IP: ww.xx.yy.zz
X-License: If you would like the source code for genform or
	the diffs against bnbform, contact michael@chebucto.ns.ca.
	http://www.chebucto.ns.ca/cgi-bin/genform is for the use of
	Chebucto users and customers ONLY.
Subject: test0
Message-Id: <19991201015146Z35384-672+237@halifax.chebucto.ns.ca>
Date:	Tue, 30 Nov 1999 21:51:39 -0400

	http://www.chebucto.ns.ca/cgi-bin/genform is a service
	provided by the Chebucto Community Net to its members and customers.
	Webmasters from sites outside Chebucto are asked (and occasionally
	enforced :) not to use this service.
	The genform script is based on bnbform v3.0 by Bignosebird.com.

Form submission from ww.xx.yy.zz:4298:
Browser: Mozilla/m.n [en] (X11; I; Linux x.y.z i586)
Page:    http://www.chebucto.ns.ca/~michael/test.html

field1 = 
field0 = munky is missing a finger


Michael


next message in archive
no next message in thread
previous message in archive
Index of Subjects