• Resolved malpica

    (@malpica)


    Hi,

    I have a custom function that show result as a part o a text.

    (function(){
    var capital=prec(fieldname45*120,2);
    var prima=prec(((fieldname45*120)*(fieldname88+fieldname89))+(fieldname45*120*0.000005),2);
    return ‘Para mantener sus ingresos durante 10 a?os necesita un seguro de vida con un capital asegurado de ‘+capital+’ contratable desde ‘+prima+’ € al a?o’;
    })()

    The problem is that in movil devices, field don’t show all text.
    How can I do it?

    best regards

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello,

    In this case my recommendation is to display the result into another field, please, follow the steps below:

    1. Insert a “HTML Content” field, with the following piece of code as its content:

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

    2. Modify the equation as follows:

    (function(){
    var capital=prec(fieldname45*120,2);
    var prima=prec(((fieldname45*120)*(fieldname88+fieldname89))+(fieldname45*120*0.000005),2);
    var result = 'Para mantener sus ingresos durante 10 a?os necesita un seguro de vida con un capital asegurado de '+capital+' contratable desde '+prima+' € al a?o';
    jQuery('.result').html(result);
    return result;
    })()

    3. Finally, as the calculated field is used as an auxiliary field, tick the attribute: “Hide Field From Public Page”

    And that’s all.
    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘multiple lines result’ is closed to new replies.