Jump to content

generating and validating a form dynamically?


blueman378

Recommended Posts

Hi guys, i was wondering whats the best way to generate a form and validate it dynamically

 

i was thinking of a database table with

 

Name Type Length Value(Nullable)

 

fill this in and have predefined types, such as email, alphanumeric, numeric, alpha, timestamp, date, text,

 

create the form, when it is submitted run it through a validator which reads the input type and validates off that

 

anyone see a better way?>

I am actually working on a form class to do just this. It is in the VERY early stages of it and does not do much of anything useful yet, but my idea for this kind of thing is call member functions to create the form and assign values to stuff.

 

I am then going to maybe have an array to keep track of the required fields. I am trying to figure out how to allow for complex forms and complex validation.

 

Take a look at  http://www.phpformclass.com/phpform/validation/1,2

 

It is a form class. The free one has no database integration though, the paid one is a hundred bucks. So I am basically going to write one of my own.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.