Nick DeNardis

User experience, code, higher education, analytics and accessibility.

Just added, Output individual fields

So PHP Simpl (opens new window) does a good job of outputting an XHTML form with very extend able features such as labels, required *’s, size and maxlength calculation, example and error output automatically. But have you ever just wanted to output the form in your own way? Well now you can, this can be accomplished with the FormField() function inside the DbTemplate class. It handles all that same great XHTML formatting, you just have to worry about where you want to flied to be displayed.

Function Prototype:

public function FormField($field, $hidden=false, $options='', $config='');


$myPost = new Post;
$hidden = false;
$options = array();
$config = array();echo '

$myPost->FormField('title', $hidden, $options, $config);
echo '';
echo '