• Resolved Asjad Aamir

    (@asjad492)


    Hi, Can you please tell what is issue in following statement as it is giving incorrect answer. If I remove other conditions and only use one, it gives correct answer.

    (function(){
    
    
    if (AND(fieldname6 == 'Buying additional residence', fieldname8 == 'Yes')) {
    
        if (fieldname7 < 40000) {
            return fieldname7*0;
        }
    
         else if (40000 < fieldname7 < 250000) {
    
        return (fieldname7-40000)*0.03;
    }
         else if (250000 < fieldname7 < 925000) {
        return SUM(250000*0.03,(fieldname7-250000)*0.08);
    }
    
    
    }
    
    })();
    
    
Viewing 7 replies - 31 through 37 (of 37 total)
  • Thread Starter Asjad Aamir

    (@asjad492)

    Hi, almost all work is done, Just one thing is irritating, I have attachd link. Please check slider field which I have written code: https://www.stampdutycalculatoruk.org?cff-form=7

    Thread Starter Asjad Aamir

    (@asjad492)

    Thread Starter Asjad Aamir

    (@asjad492)

    Are you there? I have almost done work. Only minor issue is there. Please check the video link I shared with you.

    Thanks

    Plugin Author codepeople

    (@codepeople)

    Hello @asjad492

    Yes, I check your video, but we do not offer the service you want via this forum. Please, do not hesitate to contact us via the plugin website.

    Best regards.

    Thread Starter Asjad Aamir

    (@asjad492)

    I am not asking for a service. I am just asking why after 3 fields, it is not working? i am just asking for the reason. I know it’s just a one minute task for you to fix this. You already helped me a lot. Please this is last time help me. The issue is minor. Hope you understand.

    Thread Starter Asjad Aamir

    (@asjad492)

    Can you please tell why below snippet is not executing? I am asking again and again because javascript context in your plugin is much different from the universal javascript syntax.

    (function(){
    let rate = 0.1;
    
    var cashFlows = [fieldname13, fieldname14, fieldname15, fieldname16, fieldname17, fieldname18, fieldname19, fieldname20, fieldname21, fieldname22, fieldname23, fieldname24, fieldname25, fieldname26, fieldname27, fieldname28, fieldname29, fieldname30, fieldname32, fieldname33, fieldname34, fieldname35, fieldname36, fieldname37, fieldname38, fieldname39, fieldname40, fieldname41, fieldname42, fieldname43, fieldname45, fieldname46, fieldname47, fieldname48, fieldname49, fieldname50, fieldname51, fieldname52, fieldname53, fieldname54 ];
    var npv = 0;
    
    for (var i = 0; i < cashFlows.length; i++) {
      npv += cashFlows[i-1] / ((1 + rate) ** i);
    }
    })();
    Plugin Author codepeople

    (@codepeople)

    Hello @asjad492

    I described the use of modifiers many times. Please, do not hesitate to contact us via the plugin website.

    And please, try to understand that we will not implement your project via the WordPress forum.

    Best regards.

Viewing 7 replies - 31 through 37 (of 37 total)
  • The topic ‘Using if else statement’ is closed to new replies.