code to a text value based on a number
-
Hi
I need to set the follow code to a text value based on a number:
(function(){
if(fieldname4==’1′) return ‘Liter’;
if(fieldname4==’2′) return ‘m3’;
if(fieldname4==’3′) return ‘kg’;
if(fieldname4==’4′) return ‘Ster’;
if(fieldname4==’5′) return ‘kg’;
});How can i get that?
I read the Text in a solution and put a javascript into module_public.js:
return isFinite( v ) || /\d{2}[\/\-\.]\d{2}[\/\-\.]\d{4}/.test( v ) || /Liter|m3|kg|Ster/i.test( v );But it doesn′t work!
https://www.markus-heizkessel.de/umrechnung-neu/
Thank′s for help!
Best regards.
https://www.ads-software.com/plugins/calculated-fields-form/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘code to a text value based on a number’ is closed to new replies.