So PHP Simpl 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='');

Example:
$myPost = new Post;
$hidden = false;
$options = array();
$config = array();echo '<form>';
$myPost->FormField('title', $hidden, $options, $config);
echo '<input name="submit" value="Save" type="submit">';
echo '</form>';

Comments

There are 0 comments on this post. Post yours →

Post a comment

Required fields in bold.
RSVP Form

Profile

photo Nick DeNardis
Sterling Heights, MI 48312

Currently

Results (escape to close):

Flickr