Conditionnal class name property

Hello,

In the JS editor (on the "Success event mapping" screen), I'd like to set different class name for my object "myfieldB" according to the value provided by my table.

I tried :

if ( value.myfieldA === "123" ) {
document.getElementById('myfieldB').className += 'myclassName5';
} else {
document.getElementById('myfieldB').className += 'myclassName6';
}

=> KO

I tried also other syntaxes like :

if ( value.myfieldA === "123" ) {
element.find('[name="myfieldB"]').className = "myclassName5";
} else {
element.find('[name="myfieldB"]').className = "myclassName6";
}

=> KO

Any idea to solve this issue ?

Thanks

Sam
1 person has
this question
+1
Reply