PHP Classes
elePHPant
Icontem

TM::Apeform: A very abstract web form builder and processor

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (21)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2009-09-01 (7 years ago) RSS 2.0 feedStarStarStarStar 77%Total: 7,483 This week: 3All time: 235 This week: 304Down
Version License PHP version Categories
apeform 1.0.0Free for non-comm...4.0.6HTML, Validation
Description Author

TM::Apeform creates self repeating web forms, so called "Affenformulare" (German for "ape forms"). If a million apes is typing into the form (that's the "Infinite monkey theorem"), the form is displayed again and again as long as it contains errors.

- The usage is not different from the creation, validation and processing of the form values that the user entered. Everything is done in a single script.
- The class hides the access to POST and global variables and simply returns the submitted values.
- It offers an easy way to handle input errors (checking valid email addresses for example).
- It supports all form elements including radio buttons, select boxes, file upload fields and so on.
- It provides an own templating system, so you do not have to deal with HTML at all.
- It creates labels and access keys according to HTML 4 standard and returns XHTML compatible output.
- In addition you can add JavaScript handlers to any form element.

TM::Apeform is optimized to be used with the minimum amount of source code. For example, the following script is a full functional form mailer.

<?php
require_once("Apeform.class.php");
$form = new Apeform();
$message = $form->textarea("Your Message");
$form->submit("Send Email");
$form->display();
if ($form->isValid()) mail("to@example.com", "Subject", $message);
?>

Picture of Thiemo Mättig
Name: Thiemo Mättig <contact>
Classes: 2 packages by
Country: Germany Germany
Age: 39
All time rank: 28513 in Germany Germany
Week rank: 163 Up8 in Germany Germany Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Screenshots  
  • example_templates.png
  • example_QuickForm_groups.png
  • example_advertisement.png
  Files folder image Files  
File Role Description
Plain text file Apeform.class.php Class Main class
Accessible without login HTML file Apeform_manual.html Doc. Manual and API reference
Accessible without login Plain text file ChangeLog.txt Doc. Change log
Accessible without login Plain text file example_accesskeys.php Example How to automatically create accesskey attributes
Accessible without login Plain text file example_advertisement.class.php Class Extended class with different templates
Accessible without login Plain text file example_advertisement.php Example Small advertisement form with an image upload
Accessible without login Plain text file example_colors.php Example Ideas for selecting a color in a form
Accessible without login Plain text file example_elements.class.php Class Extended class with special form elements
Accessible without login Plain text file example_elements.php Example How to use the special elements from the extended class
Accessible without login Plain text file example_email.php Example Small form mailer with error checking
Accessible without login Plain text file example_multiform.php Example How to use multiple forms on a single page
Accessible without login Plain text file example_multipage.php Example How to split a form into multiple pages
Accessible without login Plain text file example_multipage2.php Example How to split a form into multiple pages
Accessible without login Plain text file example_multiuse.php Example How to use a form multiple times
Accessible without login Plain text file example_QuickForm_elements.php Example Comparison with the features of PEAR::HTML_QuickForm
Accessible without login Plain text file example_QuickForm_groups.php Example Comparison with the features of PEAR::HTML_QuickForm
Accessible without login Plain text file example_regex_callback.php Example Extended validation methods with callbacks and regular expressions
Accessible without login Plain text file example_templates.php Example How to use different HTML and CSS templates
Accessible without login Plain text file example_tiny.php Example Basic textarea example
Accessible without login Plain text file example_tinymce.php Example How to use TinyMCE instead of a textarea
Accessible without login Plain text file test.php Test PHPUnit 1 unit test

 Version Control Reuses Unique User Downloads Download Rankings  
 0%1
Total:7,483
This week:3
All time:235
This week:304Down
 User Ratings  
 
 All time
Utility:88%StarStarStarStarStar
Consistency:88%StarStarStarStarStar
Documentation:82%StarStarStarStarStar
Examples:88%StarStarStarStarStar
Tests:75%StarStarStarStar
Videos:-
Overall:77%StarStarStarStar
Rank:49