一本道无码

一本道无码

Add Optional Items

You can customize your web form to:

  • require an individual to complete specific fields on the form before submitting it
  • require an individual to sign in through WebLogin (Andrew userID and password) to access the form
  • include an individual's information from the Carnegie Mellon university directory

You can customize a web form to require an individual to fill in one or more specific fields before submitting the form. You use the RequiredFields hidden attribute to set a required field in the HTML code.

Note: The value of the field name in the HTML code must be the same as the field on your form. The field name attribute is case sensitive and cannot contain spaces.

  • To specify one required field on a web form, add the following line with the value of the RequiredFields hidden attribute set to the exact name of the field you want to require. Add the code after the opening <form> tag and before the closing </form> tag.
    <input name="RequiredFields" type="hidden" value="fieldname" />
  • To specify multiple required fields on a web form, add a separate line for each field.

    For example, to make the Name and Email fields required on a form, add the following lines to the HTML code:

<input name="RequiredFields" type="hidden" value="Name" />
<input name="RequiredFields" type="hidden" value="Email" />

You can incorporate authentication in your web form to require an individual to sign in through Web Login (Andrew userID and password) to access a form.

Note: The Web Login form authentication function is available only on the cmu.edu server (CMS, AWPS sites), not on the andrew.cmu.edu server (User/CourseWeb).

To use authentication with your web form, do the following:

  1. Add the webiso-bin syntax to the form action in the HTML code:

<form id="my-form" name="my-form" method="post" action="/webiso-bin/mailto">

  1. Edit the .txt file template to include the %WEBISO_USER variable to pull the user ID from the information entered.

Sample Text File 

To: %MailTo
From: %WEBISO_USER
CC: %MailCC
Subject: Website Form Submission

The following person sent a website form submission from www.cmu.edu/my-site.

Name: %Name
Email: %Email
Phone: %Phone
Authenticated Andrew ID: %WEBISO_USER

Example - Form Authentication

If the name of your web form is my-form, make the following changes to your form and email message template to use authentication. In your web form HTML code, use the Web Login MailTo CGI (webiso-bin/mailto) in the opening <form> tag, not the standard MailTo CGI (cgi-bin/mailto):
  1. Opening <form> tag with authentication

    <form id="my-form" name="my-form" method="post" action="/webiso-bin/mailto">

  2. Edit the email message template .txt file to include the variable %WEBISO_USER (must be in all uppercase letters).

 

To include an individual's information from the 一本道无码 directory into your web form submission, do the following:

  1. Add the webiso-bin syntax to the form action in the HTML code:

<form action="/webiso-bin/mailto" id="my-form" method="post" name="my-form">

  1. Edit the .txt file template to include one or more of the following variables to pull the directory details from the information entered.
    MailTo CGI Value Description
    %DIRECTORY_ADDL_AFFILIATION Additional affiliations beyond primary (faculty, staff, student)
    %DIRECTORY_AFFILIATION Primary affiliation (faculty, staff, student)
    %DIRECTORY_CLASS Class level of student
    %DIRECTORY_DEPT Department in which the person is affiliated
    %DIRECTORY_EMAIL Email address (preferred/official, could be user@cmu.edu)
    %DIRECTORY_FIRSTNAME First name
    %DIRECTORY_FULLNAME Full name (first name, last name)
    %DIRECTORY_JOBTITLE Job title according to HR
    %DIRECTORY_LASTNAME Last name
    %DIRECTORY_PHONE Phone number
    %DIRECTORY_POSTAL Postal address on campus
    %DIRECTORY_SCHOOL Faculty & Students: School affiliation
    Staff: Title of most senior person in the individual's division
    %WEBISO_USER Full Andrew email address (eg., andrew-id@andrew.cmu.edu)

Sample Text File 

To: %MailTo
From: %EMAIL
CC: %MailCC
Subject: Form Results

The following person sent a website form form: %DIRECTORY_FULLNAME, %DIRECTORY_EMAIL.

Authenticated Andrew ID: %WEBISO_USER
DIRECTORY_DEPT: %DIRECTORY_DEPT
DIRECTORY_CLASS: %DIRECTORY_CLASS
DIRECTORY_FULLNAME: %DIRECTORY_FULLNAME
DIRECTORY_ADDL_AFFILIATION: %DIRECTORY_ADDL_AFFILIATION
DIRECTORY_AFFILIATION: %DIRECTORY_AFFILIATION
DIRECTORY_SCHOOL: %DIRECTORY_SCHOOL
DIRECTORY_FIRSTNAME: %DIRECTORY_FIRSTNAME
DIRECTORY_EMAIL: %DIRECTORY_EMAIL
DIRECTORY_POSTAL: %DIRECTORY_POSTAL
DIRECTORY_LASTNAME: %DIRECTORY_LASTNAME
DIRECTORY_PHONE: %DIRECTORY_PHONE
DIRECTORY_JOBTITLE: %DIRECTORY_JOBTITLE
DIRECTORY_ANDREWID: %DIRECTORY_ANDREWID
-------------------------------------------------

Comments: %Comments