Share your own ProcessMaker videos to the community
By cristofher
#828428
Buenas tardes comunidad.
Resulta que tengo una imagen de encabezado en el Dynaform, la cual quiero que cambie respecto al valor que se seleccione en una lista desplegable. He probado hacerlo con el siguiente código:

$('#image0000000002').hide();

$("#empresa").setOnchange(function(newValue, oldValue) {
//if value has "2" in it
if (newValue.indexOf('2') != -1) {
$('#image0000000001').hide();
$('#image0000000002').show();

}
else {
$('#image0000000002').hide();
$('#image0000000001').show();

}
});

el problema es que cuando la tarea es envida, el siguiente Dynaform muestra el segundo valor de la lista desplegable, pero la imagen que corresponde a la opción 1.

Adicionalemente probé este código que aparece como ejemplo en la wiki, pero cuando lo quiero visualizar no :| carga.

$ ( "#rootType" ) . setOnchange ( function ( newVal , oldVal ) {
if ( newVal == "Green_Roof" ) {
$ ( "#roofImage" ) . setValue ( "http://example.com/images/greenRoof.jpg" ) ;
$ ( "# roofImage " ) . setLabel ( " Techo verde " ) ;
}
elseif ( newVal == " Solar_Roof "
$ ( "#roofImage" ) . setValue ( "http://example.com/images/solarRoof.jpg" ) ;
$ ( "#roofImage" ) . setLabel ( "Techo solar" ) ;
}
}

ayuda por favor. :| :| :|
#828593
Hi,
In your first algorithm you can use a code like this, But you must change it for your company values exactly:
Code: Select all
$('#image0000000001').hide();
$('#image0000000002').hide();

$("#company").setOnchange(function(newValue, oldValue){
	//if your values are Green_Roof and Solar_Roof
	if(newValue == 'Green_Roof') {
		$('#image0000000001').hide();
		$('#image0000000002').show();
	}
	else{
		$('#image0000000001').show();
		$('#image0000000002').hide();
	}
});
http://pmlearning.info/
Thanks

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]

Betvisa clone scripts are pre-built software solut[…]

A Bet365 Clone Script is essentially a ready-made […]