Using forms in your web pages
Opportunities for user feedback via the web
Overview
A form can be created anywhere on your website where the page content comes from a rich text field in your onCourse database. For example, you may put a feedback form on a static page, such as ‘Contact us’ or on a page your tutors can access after they have logged in. You may use forms for collecting student feedback or to allow students to lodge their concerns or complaints. You can also put forms within course descriptions, such as a ‘course rating’ short form that allows previous students to rate and comment on the course, which you could later use for marketing the program.
The basic form is as follows:
{form name:"Class feedback" email:"feedback@college.email.address"}
<... form contents ...>
{form}
The name attribute is required and specifies the subject of the email to be sent. The email attribute is optional and if not specified will default to the email defined in onCourse preferences. Upon the form being submitted with valid data, the contents of the form will be sent to the appropriate email address with the contents of the email listing one per line each value entered, prefixed with the name of the input element. e.g.,
firstName: Bill lastName: Brown ...
An example form:
{form name:"I liked this course!" email:"whatagoodcoursesomecollege.com”}@
{text name:"Email address" required:"yes"}
{text name:"First name" required:"yes"}
{text name:"Last name" required:"yes"}
{text name:"What I liked" required:"yes" lines:"yes"}
{form}
Details
For the contents of the form you can specify certain input elements (see below for specific examples) of the following form:
{<type> name:"unique_element_name" ...}
The possible form element ‘types’ are:
- checkbox (a singular checkbox)
- checklist (a multi-select list of options via tickable options)
- text (a text input field)
- popuplist (a list of options to choose from via popup)
- radiolist (a list of options to choose from via radios)
For each ‘element’ the following attributes are required:
- type
- name
Additionally, the following are optional attributes for each element:
- default (specifies a default value for user input)
- description (provide a longer explanation of what’s required for the input)
- label (the label for the field. e.g., “First name”)
- required (if “yes” is specified, then the user must enter something. The form will not send an email until the input is valid. As such you should include at least one required field in the form to ensure you don’t receive empty submissions.)
Finally, the following lists any optional attributes specific to these elements:
- text
- lines (if “yes” is specified displays input for a paragraph or more of text)
- maxlength (relevant only if ‘lines’ is absent, specifying the maximum text length allowed. e.g., 4 for postcode)
- checklist, radiolist, popuplist
- options (a comma separated list of options to select from)
Individual Element Examples
The following are examples of each element using both required and optional attributes…
——> Text input field (using all options)
{text name:"firstName" label:"First name" required:"yes" description:"Please enter your first name." maxlength:"50"}
——> Long Text input field (using all options)
{text name:"course-description" label:"Proposed course description" required:"yes" description:"Please describe the proposed course in detail, listing any and all references to materials used." lines:"20"}
——> Checkbox (using all options)
{checkbox name:"policies-agreed" label:"Agreed to policies" required:"yes" description:"I have read the policies and agree to..."}
——> Radio list (abbreviated form using all options)
{radiolist name:"availability" label:"Availability to teach" default:"Not available" options:"Not available,Part time,Full time" description:"Please indicate which of these options best describes your availability."}
——> Popup list (abbreviated form using all options)
{popuplist name:"availability" label:"Availability to teach" required:"no" default:"Not available" options:"Not available,Part time,Full time" description:"Please indicate which of these options best describes your availability."}
——> Check list (abbreviated form using all options)
{checklist name:"availability" label:"Availability to teach" required:"no" default:"Not available" options:"Not available,Part time,Full time" description:"Please indicate which of these options best describes your availability."}
Advanced options
——> Text input field (lines)
There can be times when you might be expecting a lengthy text input, such as for a resume. In order to suggest to the user that you’d like their response to be other than short you can specify a number greater than 1 for the number of lines to display. e.g.,
@{text name:“Resume” lines:“50”}
——> Group fields by section
You might like to group certain fields together. There are a few ways to do this:
- Use a heading to separate fields. e.g.,
h3. About you - You can also group fields into a visible section: e.g.,
{section name:"About you"}{text name:"First name"}etc{section}
——> description links
You would normally specify a link to another document such as "See this document":/another/page. However it’s not possible to use this notation within the description as it’s already quoted. However you can use the backtick character (`) in it’s place. e.g.,
{text name:"Resume" lines:"50" description:"... Please see `this document`:/another/page for a suggested format."}
Newsletter subscription
ish makes regular updates to ish onCourse, and we like to let our customers know about them as soon as they're available.
Latest News
- Taking the next step - RTO Registration 3 Nov 2008
- onCourse 1.5.1 29 Oct 2008
- onCourse now 50% better! 24 Oct 2008
- onCourse turns 1.0 3 Jun 2008
- Sofa so good 14 Jan 2008