|
Posted by Drakazz on 05/19/06 21:06
All of this thread doesn't make any sense to me :O
So what is the problem you're dealing with, Luke?
Ok, so if you want to generate forms that owuld show errors, it is not
very complicated thing to do.
I am quite annoyed by only five fields, and here - thousand!!!
By simple means, you create an array, where you'd have each field info
and priority etc., and even regex validation or something, maybe a
callback in order to validate each field - your choice.
So what you'd do might look like this:
$elements=array();
$elements[]=array("name"=>"test_done","type"=>"check","default"=>false);
$elements[]=array("name"=>"done_tests","type"=>"select_multi","values"=>array("one","two"),"default"=>array(0,1));
This seems complex, and yet it is.
I might build a form creator and validator in a while.
Basically, when the form is submitted, you check for the all values, if
they're set. If it's not set, then use the default (for checkboxes),
and use the same array, and set element's "value" key to whatever value
it should be.
Complex :}
[Back to original message]
|