• Resolved cashplan

    (@cashplan)


    Hello, Support team.
    I try to use getField operation and see that it always works. Even if the CF with getField function is under condition which is not true.
    I want to assign my number (50 in example) to fieldname 1 only if the condition is respected.
    Could you have a look what is wrong?
    https://cashplan.ru/test-cf/
    PW 123

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @cashplan

    Once the form is loaded, all the equations are evaluated dynamically. So, the code: getField(1).setVal(50) is evaluated and the value 50 is assigned to the fieldname1 field. This equation does not include any conditional statement.

    Best regards.

    • This reply was modified 5 years, 1 month ago by codepeople.
    Thread Starter cashplan

    (@cashplan)

    ОК. Got it.
    I Included a real condition (not the show field)

    (function(){
        if(fieldname4<=10)
        {
             return getField(1).setVal(0);
        }
        else
        {
            return getField(1).setVal(50);
        }
    })()

    and now it works.

    As far as I understand “getField” function may send to another field only numbers but not symbols like: “x” or “*”. Am I right?

    • This reply was modified 5 years, 1 month ago by cashplan.
    Plugin Author codepeople

    (@codepeople)

    Hello @cashplan

    You can send to another field the value you want. However, based on the field’s settings, it will accept the value you pass to it or not.

    Best regards.

    • This reply was modified 5 years, 1 month ago by codepeople.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘getField operation’ is closed to new replies.