PHP Classes

File: example_elements.php

Recommend this page to a friend!
  Classes of Thiemo Kreuz   TM::Apeform   example_elements.php   Download  
File: example_elements.php
Role: Example script
Content type: text/plain
Description: How to use the special elements from the extended class
Class: TM::Apeform
A very abstract web form builder and processor
Author: By
Last change: Updated
Date: 14 years ago
Size: 736 bytes


Class file image Download

 * Extended form elements example. Shows use of an extended class to provide
 * some special form elements with build in error checking.
 * @author Thiemo Mättig (

// Include the extended class.

// Instantiate an object from this class.
$form = new ExtendedApeform();

// Add some of the extended input fields to the form.
$date = $form->date();
$date = $form->dateSelector();
$email = $form->email();
$date = $form->price();
$image = $form->filetype("<u>I</u>mage", "JPG, PNG etc. only", "image/*", 10,

// Process the form if it was submitted error-free.
if ($form->isValid()) echo "Thank you!";