Re: [psa-devel] Assistance Request
Brought to you by:
koivi
From: Justin K. <ju...@ko...> - 2003-08-22 15:13:32
|
Albert Lash wrote: > I will need to add (at least - looking for additional input) these fields to > the psa_users table: Here are the fields that I use a lot in stuff like this: first_name last_name company address address2 city county state zip country phone fax email cell pager sex birth_date profession You'll need to add a config array to the config file like: array( 'first_name' = REQUIRED, 'last_name' = REQUIRED, 'company' = TRUE, 'address' = TRUE, 'address2' = TRUE, 'city' = TRUE, 'county' = FALSE, 'state' = TRUE, 'zip' = REQUIRED, 'country' = FALSE, 'phone' = FALSE, 'fax' = FALSE, 'email' = REQUIRED, 'cell' = FALSE, 'pager' = FALSE, 'sex' = FALSE, 'birth_date' = FALSE, 'profession' = FALSE ) you'd have to define the REQUIRED constant (I'd suggest something like -1 since TRUE =1 and FALSE =0). FALSE fields are skipped (for everything), TRUE and REQUIRED fields are the only ones displayed. When a form is posted, check against the config array to be sure all is satisfied. Push warnings for FALSE fields that were in the input, and errors for missing required fields. The form coding should make use of the VALUE, CHECKED and SELECTED attributes where values are taken from the posted information in case of error. The values for these attributes need to be checked agains submitted information to avoid warnings about non-defined variables. Hope this helps out. I've been just too damn busy to do much of anything anymore. :( |