• Resolved angie1357

    (@angie1357)


    I have 3 different products and i’ve assigned the value 1, 2, & 3 to them as hidden field types.

    The user needs to be able to tick a feature and the output will tell them which product to get.

    I found a thread about changing the code in the module_public.js to then output the text:

    return isFinite( v ) || /\d{2}[\/\-\.]\d{2}[\/\-\.]\d{4}/.test( v ) || /Professional Website|Premium Website|Ultimate Website/i.test( v );

    This seems to work, but it’s only picking up the first text, “Professional Website”

    My calculated field equation looks like this:

    (function(){

    if(fieldname1 <= 1) return fieldname4;

    if(fieldname1 <= 2) return fieldname6;

    if(fieldname1 <= 3) return fieldname7;

    })();

    (function(){

    if(fieldname4 <= 1) return “Professional Website”;

    if(fieldname6 <=2) return “Premium Website”;

    if(fieldname7 <= 3) return “Ultimate Website”;

    })();

    Please can you tell me where i’m going wrong?

    Thanks
    Angie

    https://www.ads-software.com/plugins/calculated-fields-form/

Viewing 5 replies - 16 through 20 (of 20 total)
Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Text output’ is closed to new replies.