You are here: Re: Editable forms with 1000 elements « PHP Programming Language « IT news, forums, messages
Re: Editable forms with 1000 elements

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 :}

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация