I have one problem whith custom dependency. I created a module named "Inventario". This module have a text box and a combo box. The text box in required when value of combo box is "Reenviado".
In the path custom\modules\Inven_Inventario\Ext\Dependencies I created the following file named CustomDependences.php
estado_c is id of comboBoxPHP Code:<?php
$dependencies['Inven_Inventario']['required_CodigoPostal_dep'] = array(
'hooks' => array("all"),
'trigger' => 'true', //Optional, the trigger for the dependency. Defaults to 'true'.
'triggerFields' => array('estado_c'),
'onload' => true,
//Actions is a list of actions to fire when the trigger is true
'actions' => array(
array(
'name' => 'SetRequired',
//The parameters passed in will depend on the action type set in 'name'
'params' => array(
'target' => 'cod_postal_destino_av',
'label' => 'cod_postal_destino_av_label',//id of the label to add the required symbol to
'value' => 'equal($estado_c, "Reenviado")' //Set required if the status is closed
)
),
),
//Actions fire if the trigger is false. Optional.
'notActions' => array(),
);
?>
cod_postal_destino_av is id of text box
cod_postal_destino_av_label is id of label of text box.
I rebuilt with a quick repair after modification but not working.
I need your help


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks