Buenos días:
Estoy intentando hacer que un campo sea requerido en función del valor de un combo. Para ello he seguido el manual de desarrollo pero no me funciona, es mas, no hace nada.
Estoy usando la version 6.2.0 CE y los pasos que he seguido son estos:
1.- Crear en esta ruta un fichero es ésta ruta custom\modules\Inven_Inventario\Ext\Dependencies\ llamado dependency_pruebas.php
2.- El fichero contiene esto:
Como podéis ver el campo código postal es requerido si el valor del combo estado es Reenviado.PHP Code:<?php
$dependencies['Inven_Inventario']['dependency_pruebas'] = 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(),
);
?>
Pues haciendo esto no funciona.
Podéis echarme una mano??
Gracias de antemano.


LinkBack URL
About LinkBacks



Reply With Quote



Bookmarks