CS Automated Form Handler

CS Automated Form Handler

The department web site has an automated form handler, which allows a user to create a form, that when submitted, will be stored in a database in addition to providing email notification to a number of recipients.

Create a web form as your normally would (discussions of basic HTML form creation are beyond the scope of this document).

To use the autoform handler, set the action attribute of the form element to

/web_resources/php/form_handler.php

Next add an input element of type "hidden". Add a name attribute and choose a unique value for your form:

<input type="hidden" form_name="your_form_name">

Optionally, you may also redirect the submitter to a page after completing the form. This is done by including another "hidden" input element as follows:

<input type="hidden" name="success_redirect" value="your_redirect_url">

with the value being a valid URL.

The following lines can be cut and pasted into your code, with the name value entered:

<form action="/web_resources/php/form_handler.php" method="post"> <input type="hidden" name="form_name" value="{form name here}"> <input type="hidden" name="success_redirect" value="{URL here}">

All autoforms must contain a CAPTCHA, to avoid email spam from being sent through the form. The department web site has an automatic CAPTCHA generator, which must be inserted into the form. The code below can be cut and pasted into your document.

<img src="/web_resources/php/captcha.php"> <input type="text" size="20" name="captcha" value="">

When the form is first activated, you will be taken to a form registration page; fill out the information here and your request will be forwarded to the Lab staff who will notify you when your form is activated.

The form handler has options to automatically send email notification when a form is submitted. Additionally, all submitted information is archived to a database. Administrative staff can access the form data and download the data; other users can request access to individual form data. Custom web applications to display the information in the database are possible, but development of such will be the responsibility of the user, unless a request for one is approved by the Communications Committee.

If you have any questions please contact the Lab staff.