Re: Forms validation and creation- easier solution?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On May 20, 2009, at 2:03 AM, Angelo Zanetti wrote:

We have done quite a few projects and we are looking to find better ways to
implementing forms.

This is fairly simple to roll-your-own.

I do it from metadata. I check MySQL metadata for data types, lengths, and defaults. In addition, my metadata tables contain:
 -- field captions
-- field-use descriptions and business rules (generates CSS pop-up help)
 -- the type of control used
-- the source of data for controls (I call system codes: like the lists of choices for comboboxes and radio buttons -- I keep almost all of these in a single table.)
 -- whether data in a field is required
-- whether the data in a field are visible, editable, or new-record- only editable -- whether the data are encrypted (core data class handles the encryption/decryption)
 -- data entry order
 -- any non-standard user rights to the data.
-- Simple business rules (like maximums, minimums and ranges of acceptable values) -- easy validation categories: birthdates, eMail formatting, USA phone numbers & postal codes, US social security #'s, credit card format, and the like.

The last two can generate JavaScript, too (still working on that).

-- I also am working on more complex validation being automatic: across fields or tables, dependent on other variables, etc.

By standardizing the format of metadata and the means of storing system code values, plus core CSS class names, you can use this across projects.

Ken

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux