CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Conditioning Text box Requirement

Print topic Send  topic

Author Message
Goku
Posted: 04/04/2004, 12:39 PM

Good day!

I would like to ask if it is possible and how to make one or more TextBoxes in a record form required, but that requirement is conditioed by one CheckBox in same record form. So, if that CheckBox is checked, next two TextBoxes are required, if not checked TextBoxes are not required... If it si possible please tell me how to do that.

Thnx

Andrej
srinivas

Posts: 54
Posted: 04/04/2004, 1:05 PM

You can do this couple of ways.

The most direct and simple way might be to use an event such as on validate and do your own checking and writing errors back to the form if needed.

The second approach, that I used in cases such as these, is to write a code/regular expression validation on the form control you are trying to enforce a condition. You can get pretty clever and put complex expressions in there and every thing would work just fine.

Hope that would help.

-Srinivas
View profile  Send private message
peterr


Posts: 5971
Posted: 04/04/2004, 2:12 PM

You could also do this with JavaScript by finding various examples on the net ( http://www.google.com/search?q=javascript+checkbox+required+validation ) and then modifying them to work as you need. You may even be able to find an example for your exact scenario - just spend some time reading. Here is another search that may help:
http://www.google.com/search?q=javascript+field+required+checkbox+checked
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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