• Resolved rphrus

    (@rphrus)


    Hi,

    I have an equation below which works fine but I would like the long result to display what you advised in the forum using the html content. I am not sure how to set this up.
    I have fieldname 2 = input price; another field the calculated field below
    IF(AND(fieldname2),prec(MIN(fieldname2/2*10*5/75/4,30),1)+’ – ‘+prec(MIN(fieldname2/2*30*5/75/4,30),1)+’ dollars ‘,”)

    How do you set this up to display the result using html content?

    Thanks

    • This topic was modified 7 years, 5 months ago by rphrus.
Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    The process is really simple:

    – Insert a “HTML Content” field in your form, and enter, as its content, the piece of code below:

    <div class=".equation-result"></div>

    – Modify the equation as follows:

    (function(){
    jQuery('.equation-result').html(IF(AND(fieldname2),prec(MIN(fieldname2/2*10*5/75/4,30),1)+' – '+prec(MIN(fieldname2/2*30*5/75/4,30),1)+' dollars ',''));
    })()

    and that’s all.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘display answer with long text’ is closed to new replies.