CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 conditional mandatory fields

Print topic Send  topic

Author Message
bhwatts
Posted: 11/14/2002, 4:22 PM

How do I perform conditional checks for mandatory fields?
For example, when a user enters 'USA', I want State and
Zip code to be mandatory, but not when the country is not
'USA'. Furthermore, I would like to validate these conditional
fields -- i.e. have the zip code conform to the U.S. standard,
and have the zip code rejected when the country is not 'USA'.
It seems like this type of checking has to be hand-coded which
is normally very easy to do, but is a real pain with CCS.
RonB
Posted: 11/15/2002, 2:30 AM

If you mean that javascript gets messed up in CCS there is a workaround. Put everything you want to do into JS functions and put them into the head section. In the body section only call the functions where you need them. CCS seems to leauve short pieces of JS intact.
bhwatts
Posted: 11/15/2002, 7:48 PM

I realise that one can perform these validity checks with JS,
but it is a pity that CCS has a lot of nice server side validity
checking facilities, but no easy way of combining checks on more than
one field, or of having a conditional mandatory field such as described
above. It is easy to do this on the server side when not using CCS
-- the problem with doing it on the server side when you use CSS is
that unless you enter the code within the CSS recognized functions,
you have a real headache in maintaining the code -- i.e. the changes
you make inside the script code will get overwritten when you update the
page.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.