Support » Plugin: Calculated Fields Form » Calculation in progress

  • Resolved kapdev

    (@kapdev)


    Hello,

    I need help with the calculation in progress indicator. Even though I have selected it in the form settings, it doesn’t display live on the page. Would you please let me know how to activate it?

    Also, is there a way to change “calculation in progress” to a different text?

    Thanks!

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

    (@codepeople)

    Hello @kapdev

    Could you indicate the URL to your form, please? Our plugin does not display the “calculation in progress” text. It loads an animated gif. But probably, your equations are evaluated faster than your browser loads the image from the server.

    Best regards.

    Thread Starter kapdev

    (@kapdev)

    Sure. Here it goes. I used the link tab to insert it. It takes several seconds for the calculation to be executed.

    Plugin Author codepeople

    (@codepeople)

    Hello @kapdev

    I’m sorry, I’ve not received the link. However, I recommend you to install the latest update of the plugin that includes modifications in the processing animation.

    Best regards.

    Thread Starter kapdev

    (@kapdev)

    Thanks, it automatically updates. It is updated.

    https://pediatraya.com/peso-talla/

    Also, is there a way for the white box (from the html content) not to display until results are computed?

    Thread Starter kapdev

    (@kapdev)

    For protection, would you please delete the link when you are done viewing it? Thanks

    Plugin Author codepeople

    (@codepeople)

    Hello @kapdev

    The issue is simple, the equations are evaluated too fast, even before the animation begins.

    About your second question, you have defined the “HTML Content” fields as dependent on the fieldname10 field’s choices. So, these fields are visible before complete the evaluation of the equations. If you want to display the fields after evaluating the equations, the correct would be to configure these fields as dependent on the calculated field:

    https://cff.dwbooster.com/blog/2020/03/01/dependencies

    Best regards.

    Plugin Author codepeople

    (@codepeople)

    Hello @kapdev

    I’m sorry, I cannot edit your entries. Only you or the forum moderators can do it.

    Best regards.

    Thread Starter kapdev

    (@kapdev)

    It won’t allow me to edit my entries after an hour has elapsed, so I can’t remove it.

    I can’t configure the dependencies to the calculated fields, because text doesn’t wrap in the calculated fields. Is there any way for the html box not to show until the results display?

    Plugin Author codepeople

    (@codepeople)

    Hello @kapdev

    I’ll try to describe an alternative with a hypothetical example.

    Assuming you have the equation

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

    But you want to display the text into result-here after the equation is completed:

    The previous equation can be edited as follows:

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

    The result with be displayed into result-here one second after evaluating the equation.

    Best regards.

    Thread Starter kapdev

    (@kapdev)

    Good morning!

    I implemented your solution in a cloned version and unfortunately it doesn’t work. Any other suggestions?

    Plugin Author codepeople

    (@codepeople)

    Hello @kapdev

    You are not assigning the background white color to the correct tags. You have defined the class names:

    .html-fem-estatura{
    	text-align:left;
    	text-indent: 30px;
    	text-height:18px;
    	font-weight: bold;
    	background: white;
    	
    }
    
    .html-fem-PESO{
    	text-align:left;
    	text-indent: 30px;
    	text-height:18px;
    	font-weight: bold;
    	background: white;
    	line-break:4px;
    	
    }
    
    .html-masc-bmi{	
    	text-align:left;
    	text-indent: 30px;
    	text-height:18px;
    	font-weight: bold;
    	background: white;
    	line-break:4px;
    }
    .html-fem-bmi{	
    	text-align:left;
    	text-indent: 30px;
    	text-height:18px;
    	font-weight: bold;
    	background: white;
    	line-break:4px;
    }

    But actually, you should apply these styles to the contained tags:

    .result-here-percentiloBebeMascPeso,
    .result-here-percentiloFemPeso,
    .result-here-percentiloMascEstatura,
    .result-here-percentiloFemEstatura,
    .result-here-percentiloMascPesoTalla,
    .result-here-percentiloFemPesoTalla{
    	text-align:left;
    	text-indent: 30px;
    	text-height: 18px;
    	font-weight: bold;
    	background: white;
    	line-break: 4px;
    	color: #0564C8;
    	display: none;
    }

    And finally, you should display the tags as part of the equation:

    jQuery('.result-here-percentiloFemEstatura').html(percentiloFemEstatura).show();

    Best regards.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.