Проверка пользовательского поля vTiger beforesave

Я создал собственный модуль на vTiger 6.5.

Я создал обработчик событий для модуля, но мне интересно, как я могу выполнить какую-то проверку в этом поле. Так что толстый я сделал это, но я не могу заставить его работать, я проверил обработчик, просто повторяя жало, и он отлично работает.

См. Мой код ниже. Благодаря!

<?php /*+*********************************************************************************** * The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. *************************************************************************************/ # getModuleName : Returns the module name of the entity. # getId : Returns id of the entity, this will return null if the id has not been saved yet. # getData : Returns the fields of the entity as an array where the field name is the key and the fields value is the value. # isNew : Returns true if new record is being created, false otherwise. # 'vtiger.entity.beforesave.modifiable' : Setting values : $data->set('simple_field', 'value'); class isaHandler extends VTEventHandler { function handleEvent($eventName, $entityData) { global $adb; $moduleName = $entityData->getModuleName(); if($moduleName=='isa'){ if($eventName == 'vtiger.entity.beforesave.modifiable') {} if($eventName == 'vtiger.entity.beforesave') { if('currentamount' > 20000){ echo "Please go back and enter less than 20000"; exit; } } if($eventName == 'vtiger.entity.beforesave.final') {} if($eventName == 'vtiger.entity.aftersave') { } } } } ?>