IUPUI integrated images

Web by Design logo
Home Tutorials Resources Kudos CV



After over a decade of service to the web community, I have made the decision that Web by Design has served its purpose and lived a fruitful life. It is time to shutter the doors and move on. However, due to the fact that so many continue to reference this tutorial, I will keep it available for the near future.

Thank you for your support over the years. It has been a pleasure.


Using Transform to Process Required Field Web Forms

This documentation was adapted from the Web Form with Transform 3.0: the Users' Guide. Transform is ONLY available to Indiana University.

Creating a Form with Required Fields

This is a continuation of the Using Transform to Process Web Forms tutorial and is based on the same sample form used previously.

This portion of the tutorial demonstrates how to make specified fields in your web form required entries: when the reader does not complete a required field, it returns an error response. However, having a required field does NOT mean that values are verified, such as making sure that phone numbers have the correct number of digits or are numeric; it simply verifies that the reader supplied data in the required form field.

This is a continuation of the template you previously began. New additions to the sample template file below are shown in RED.

# begin template

# this *email-response* section modifies some E-mail fields to make them
# required by adding a req- to the field name
# notice that only a single iteration of a specific field must be made required
# for it to be required in every instance of the form

To: type your E-mail address here
From: [
Subject: Question from [

[name] submitted this Ice Cream survey

Submitted information:
E-mail address: [email]
Phone: [
Address: [address]

[name]'s favorite ice cream is [favorite] [other].

[name] has a [entry].

[name] discovered his/her favorite place to each ice cream from one or more of the following:
*[kid]—identify: [whatkid]

Additional comments:


# Now let's add a section which describes a successful form submission
# Note the *success-response* section header
# Since this response is being returned to the user's www browser it
# must be a correct html document
<TITLE>The Ice Cream Survey</TITLE>
<P>Thank you, [name], for your submission</P>

<P>I have recorded the following survey information:</P>

<P>[name] submitted this Ice Cream survey</P>

<P>Submitted information:<BR>
E-mail address: [email]<BR>
Phone: [phone]<BR>
Address: [address]</P>

<P>[name]'s favorite ice cream is [favorite], [other].</P>

<P>[name] has a [entry].</P>

<P>[name] discovered his/her favorite place to each ice cream from one or more of the following:<BR>
*[kid]—identify: [whatkid]</P>

<P>Additional comments:</P>



# Now let's add an error-response section
# Again, this must be in the form of an html document because it is being
# returned to the user's browser.
# Remember, this section is displayed to the reader when required
# fields, flagged with req-, are not completed by the reader.
<TITLE>Error in Form Submission</TITLE>
<P>Sorry, [name], you have attempted to submit an incomplete form.</P>

<P>Make sure you have completed the following fields:<BR>
Your E-mail address: [email]<BR>
Your phone number: [phone]<BR>
Your name: [name]</P>

<P>Use your browser's back button to return to the form and complete the necessary fields.</P>

# end template file


Return to Using Transform to Process Web Forms