• Resolved badmax69

    (@badmax69)


    Hi,

    I have a field that gets data from another form via
    var result = JSON.parse(SERVER_SIDE(‘unserialize’, 12));
    jQuery(‘[id*=”fieldname’+’3_”]’).attr(‘value’, result[‘fieldname’+3]);

    A Calculated Field should use this, but fieldname3 is not yet filled at the time of the calculation, so a wrong value comes out. How can I tell the calculated field when it is allowed to calculate?

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

    (@codepeople)

    Hello @badmax69

    I’ll try to describe the process with a hypothetical example. Assuming your current equation is:

    fieldname3*fieldname4

    Edit the equation as follows:

    
    IF(AND(fieldname3, fieldname4), fieldname3*fieldname4, '')
    

    Now, edit the code that assigns the value to the field as follows:

    
    jQuery('[id*="fieldname'+'3_"]').attr('value', result['fieldname'+3]).change();
    

    Or if the code is part of an equation, you can simplify it as follows:

    
    getField(3).setVal('value', result['fieldname'+3]);
    

    For additional questions about the pro or commercial features please contact us directly on our site.

    Commercial products are not supported in these forums. We will happily answer this and any other questions you can have on our own site.

    Thank you.

    Thread Starter badmax69

    (@badmax69)

    Fast and perfect as always. Thank you 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Wait until fieldname is filled from Server’ is closed to new replies.