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

The online gambling industry is booming, and with[…]

🚀 Discover the future of crypto trading with Bit e[…]

ucas personal statement help

If you want ucas personal statement help than you […]

Though Many popular NFT Marketplaces are in the cr[…]