Page 1 of 1

problem with Dataface_Error::permissionDenied on widget:type

PostPosted: Tue Apr 03, 2012 3:54 am
by fantomasdm
Hi in function:
Code: Select all
function idDittaProposta__validate( &$record, $value, &$params)
{

     if ( ($_POST['Tipologia']=="apparecchiature di laboratorio e scientifiche" || $_POST['Tipologia']=="apparecchiature biomedicali") && $value == "")
      {
            $params['message'] ="Per le tipologie di intervento  ".$_POST['Tipologia']." occorre Proporre una Ditta ";
         Dataface_Error::permissionDenied("Per le tipologie di intervento ".$_POST['Tipologia']." occorre Proporre una Ditta");
         return false;
      }
      return true;
}


with fields.ini:
Code: Select all
[idDittaProposta]
widget:type = select
vocabulary = ditte
visibility:list=0
#widget:label ="Ditta Proposta"
group = DatiUtenti


and valuelist.ini
Code: Select all
[ditte]
__sql__ = "select IDDitta,Ditta from ditte order by ditta"



Dataface_Error::permissionDenied don't work. A can see error on $params['message'] but not on field!