Creating a Web Form

Customize Your Own Form for Custom Feedback Needs

Published: Monday, June 15, 2009

Updated: Monday, August 30, 2010 15:08

Loading the player ...
Get the Flash Player to see this player.

Note: The above video is intended for creating a "Letter to the Editor" form, but the form scripting is the same for general purposes, as well.

For purposes ranging from classifieds submissions, tips or creating forms for feedback for section editors, the code attached can be repurposed to suit your needs.

We created a generic form that gives options for several types of input. We created standard values to which newspaper partners have requested – these values are set in a mail script on our server.

By manipulating the HTML code, you can reorder, reā€label or repurpose some of the submission fields. Advanced users in CP5 can go as far as customizing the CSS to style the forms further.

Copy can be added anywhere within the form by inserting the text between <p> tags. As seen in the code, some values range from a check box, drop down menu or simple open text (as employed in the ‘Letter to the Editor' form).

However, it is important to know that any input field cannot be renamed. The script on our servers will not recognize new variables or new field names. That said, more names or variables can be created upon request. Please e-mail us for more information.

For an example on the limits of what can be manipulated, if a classifieds submission form was needed and a drop down menu was required to select one of the options: ‘day,' ‘week,' or ‘month.' The form would need to use the variable "State" or "Year" to create that drop down.

The <label> tag could be renamed so the field was labeled correctly for the reader. The <option> tags also could be renamed, but the <select name="State"> tag cannot be changed (as this is the variable the mail server will recognize to pass along information). The resulting email submission would record the value as such:
State = Day

Finally, note that e-mail address is a required field on ALL forms.

We highly recommend you do extensive testing before making any forms live on your site (by placing a link in the navigation). Please only attempt to create forms if you are familiar with HTML – if not, contact us!

SUMMARY NOTE: E-mail address is a required field. Removing that input will prevent the form from working. Also note: Inputs, asifde from the e-mail field, may be removed, but name attributes of inputs may not be altered.

Recommended: Articles that may interest you