[ad_1]
Hello @pexel
If you have multiple tags with data-cff-field="fieldname19", all of them will contain the fieldname19 value. If you want to display a tag or another the solution would be different.
Assigns a different class name to the tr tag as follows:
<table><tbody>
<tr class="choice-a">
<td style="text-align: left;"><b class="kriter1-aciklama mobile-aciklama">Hesaplama Sonucu :</b></td><td style="text-align: right;"><b><span data-cff-field="fieldname19"class="kriter1-sonuc mobile-sonuc" style="color:#ff6504;"></span></b><text style="color:#ff6504;"> </text></td>
</tr>
<tr class="choice-b">
<td style="text-align: left;"><b class="kriter2-aciklama mobile-aciklama"></b></td><td style="text-align: right;"><b><span data-cff-field="fieldname19"class="kriter2-sonuc mobile-sonuc" style="color:#ff6504;"></span></b><text style="color:#ff6504;"> </text></td>
</tr>
<tr class="choice-c">
<td style="text-align: left;"><b class="kriter3-aciklama mobile-aciklama"></b></td><td style="text-align: right;"><b><span data-cff-field="fieldname19"class="kriter3-sonuc mobile-sonuc" style="color:#ff6504;"></span></b><text style="color:#ff6504;"> </text></td>
</tr>
<tr class="choice-d">
<td style="text-align: left;"><b class="kriter4-aciklama mobile-aciklama"></b></td><td style="text-align: right;"><b><span data-cff-field="fieldname19"class="kriter4-sonuc mobile-sonuc" style="color:#ff6504;"></span></b><text style="color:#ff6504;"> </text></td>
</tr>
</tbody></table>Now, assuming your equation is fieldname1+fieldname2, and fieldname3 is a radio button field with four choices whose values are: a, b, c, and d
Edit the equation as follows:
(function(){
jQuery('.choice-a,.choice-b,.choice-c,.choice-d').hide();
if(fieldname3 == 'a') jQuery('.choice-a').show();
if(fieldname3 == 'b') jQuery('.choice-b').show();
if(fieldname3 == 'c') jQuery('.choice-c').show();
if(fieldname3 == 'd') jQuery('.choice-d').show();
return fieldname1+fieldname2;
})()Best regards.
Thread Starter
pexel
(@pexel)
Think about it and make sure you have something to do with it.
(function(){
var kriter1 = 0;
kriter1 = prec(fieldname2/0.39370,0);
jQuery('#calculation-kriter1').html(kriter1);
jQuery('.kriter1-aciklama').html('Ekran Köşegeni : ');
jQuery('.kriter1-sonuc').html(kriter1+' cm');
return kriter1;
})();(function(){
var kriter2;
if(fieldname8 == 1) {
kriter2=prec((fieldname1*0.8),2);
};
if(fieldname8 == 2) {
kriter2=prec((fieldname1*0.871575),2);
};
if(fieldname8 == 3) {
kriter2=prec((fieldname1*0.919145),2);
};
jQuery('#calculation-kriter2').html(kriter2);
jQuery('.kriter2-aciklama').html('Genişlik : ');
jQuery('.kriter2-sonuc').html(kriter2+' cm');
return kriter2;
})();- This reply was modified 16 seconds ago by pexel.
