• Resolved Sirius Pro

    (@siriusproio)


    Hi,

    I need help.

    I’m trying to display calculation of one field lets say fieldname39 in content of another field lets say it is a html block fieldname40.

    How can i achieve this?

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

    (@codepeople)

    Hello @siriusproio

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

    fieldname1+fieldname2

    Enter a DIV tag into the content of the “HTML Content” field with an unique class name, for example:

    <div class="result-here"></div>

    And then edit the equation as follows:

    
    (function(){
    var result = fieldname1+fieldname2;
    jQuery('.result-here').html(result);
    return reesult;
    })()
    

    Best regards.

    Thread Starter Sirius Pro

    (@siriusproio)

    works perfect! how can i prefix and sufix to this result?

    Thread Starter Sirius Pro

    (@siriusproio)

    and if_not_empty?

    Plugin Author codepeople

    (@codepeople)

    Hello @siriusproio

    The if_not_empty is used only with the thank you page and notification emails, into the equations you have the javascript conditional statements. Concerning the suffix, you can include it as part of the equation:

    
    (function(){
    var result = fieldname1+fieldname2;
    if(result) jQuery('.result-here').html(result+' €');
    return result;
    })()
    

    Best regards.

    Thread Starter Sirius Pro

    (@siriusproio)

    done and solved, thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show field results in other field content’ is closed to new replies.