TerraForm example code gallery

  • Browser test suite
    These forms provide a range of formats so that you may test out functionality in different browsers.

  • Techniques index
    Browse a list of techniques demonstrated by these examples.
  1. Inline error messages [NEW]
    Typically, TerraForm displays a list of errors at the top of your form as well as highlighting the fields in error. Now you can elect to display errors next to the fields themselves.

  2. Adding client-side validation to your form
    Supplementary client-side validation saves time for your visitor as the page does not need to reload to catch simple errors, which also reduces the load on your server.

  3. Related select boxes
    Related select boxes are a common requirement. The visitor selcts an option from the first box, and this changes the set of options available from the second box.

  4. Custom field examples
    These example form fields demonstrate using a custom settings file to declare your own presets and datatypes.

  5. Dynamic form
    This form is generated dynamically based on a set of database records.

  6. Booking form
    A simple example of basic data collection. When the form is submitted, the booking enquiry is stored in the database and an email is sent.

  7. TABLE-less form layout
    This form demonstrates use of div and related tags instead of the more common misuse of tables for form layout.

  8. Client/server gateway JSAPI example
    This sample demonstrates an implementation of the Client/server gateway JSAPI available from PengoWorks.com. This tool allows the web page to request information back from the server as the content of the form changes, without reloading the page.

  9. Employee database
    This example provides the ability to list, view, add, edit, and delete employees, all using generic code you can reuse on other projects. Now demonstrates associating a photograph with each record.

  10. File upload form
    This form demonstrates the use of the enhancedfile format. This format (for ColdFusion MX only) provides various file validation methods, thumbnail previews of image files, as well as overcoming the various severe limitations of regular file fields.

  11. Fusebox form
    A sample form built using the Fusebox 3 framework.

  12. Multilingual form
    TerraForm includes a range of multilingualization, internationalization and localization (M17n / I18n / L10n) features to make building forms for your locale or for multiple locales easy. You can even make the same form display in different languages.

  13. Multiple-choice survey
    This simple survey asks you to select from a range of responses for each question — technically this is called a Likert Scale. The form fields are not hard-coded on the page, but generated dynamically based on records in a database. Two approaches are demonstrated here.

  14. Multiple-page form
    A multi-page form is really a set of forms that divides collection of a volume of information into smaller, manageable chunks. The collected information is passed behind the scenes from one form to the next.

  15. Sign up / login forms
    This example demonstrates some simple user authentication forms.