rendered paste body<html>
<head><title>test</title></head>
<body>
<?
include("./includes/config.php");
$testform = new FormBuilder("testform",$PHP_SELF);
$testform->validates_presence("butt","butt2");
$testform->validates_not_null("butt2");
if($testform->was_submitted()){
if($testform->validate()){
echo "form validated";
print_r($testform->m_submission);
}
$testform->print_debug();
}
?>
<? if($testform->has_errors()){ ?>
<div style="width:30%;border:4px solid red; color:red; padding: 5px;">
The following errors were encountered:<br />
<ul>
<? foreach($testform->get_validation_errors() as $errormsg){ ?>
<li><?=$errormsg;?></li>
<? } ?>
</ul>
</div>
<? } ?>
<?=$testform->r_formheader();?>
<p><label for="butt2">Butt 2:</label><br />
<?=$testform->r_textfield("butt2");?></p>
<p><label for="butt">butt!</label><br />
<?=$testform->r_textarea("butt");?></p>
<?=$testform->r_submit("submit","wooooo");?>
<?=$testform->r_closeform();?>
<form method="post" action="<?=$PHP_SELF;?>">
<input type="text" name="clams"/>
<input type="submit" value="woot"/>
</form>
</body>
</html>