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 |
 |
 |
vikrant
Posts: 32
|
| Posted: 08/10/2007, 12:11 AM |
|
Hi,
I put my code in OnValidate event and it Works!
thanks
_________________
Vikrant |
 |
 |
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 |
 |
 |
|