CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 UpdateAllowed = false; Not Working

Print topic Send  topic

Author Message
vikrant


Posts: 32
Posted: 08/09/2007, 11:18 PM

Hi,
I am using php and mysql, and I use some validation code in Before Update event, and if my validation is false I give error message and set UpdateAllowed = false; but still values are saving!
My code is like:

If(mycondition == false)
{
$FormName-> UpdateAllowed = false;
$ FormName ->Errors->addError("You are not allowed to save this value.");
}

Can anybody give me the solution…
_________________
Vikrant
View profile  Send private message
vikrant


Posts: 32
Posted: 08/10/2007, 12:11 AM

Hi,
I put my code in OnValidate event and it Works!

thanks
_________________
Vikrant
View profile  Send private message
lvalverdeb

Posts: 299
Posted: 08/10/2007, 8:27 AM

Try:

  
global $FormName;  
If($mycondition === false)  {  
     $FormName->UpdateAllowed = false;  
     $ FormName ->Errors->addError("You are not allowed to save this value.");  
}  



_________________
lvalverdeb
CR, GMT-6
XAMPP/Ubuntu/CCS3.2/4
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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