• Resolved Matthias Pabst

    (@matthiaspabst)


    Hi!

    First of all: this is a great plugin and it’s fun to work with.

    My question: is it possible to display the value of a calculated field within a text phrase?

    Example: the value of a calculated field is “50”. I want to display this value like this:
    “Lorem ipsum dolor sit amet, 50 consectetur adipiscing elit.”

    Best regards
    Matthias

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

    (@codepeople)

    Hello @matthiaspabst

    Yes, that’s possible.

    Please, insert an “HTML Content” field in the form with the following piece of code as its content:

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

    Now, assuming your current equation is fieldname1+fieldname2, please, edit it as follows:

    (function(){
    var result = fieldname1+fieldname2;
    jQuery('.result-here').html('Lorem ipsum dolor sit amet, '+result+' consectetur adipiscing elit.');
    return result;
    })()

    Finally, as the calculated field is being used as an auxiliary field, you can hide it by ticking a checkbox in its settings.

    Best regards.

    Thread Starter Matthias Pabst

    (@matthiaspabst)

    Thank you! This is, what I was looking for.

    Best
    Matthias

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display value of a calculated field in a text phrase’ is closed to new replies.