Hello @bobbiedoo
The process is very simple:
– Assign the predefined class name: hide
to the fields you want hide until the button be pressed.
Note: enter the word: hide
into the “Add CSS Layout Keywords” attribute, in the settings of these fields.
– Edit the onclick event of the calculate button as follows:
jQuery('.hide').removeClass('hide');
Note 2: there is an attribute in the settings of button fields for entering the onclick event.
and that’s all
Best regards.
Thanks, it worked.
Another question:
How can I display the content of a calculated field in section break or summary such as:
Note: Your estimated due date is [fieldname6]. However, your actual due date could be 10 days before or after this estimated date.
Is this possible?
Hello @bobbiedoo
Yes of course, that’s possible and the process is very simple.
I’ll try to describe it with a hypothetical example.
Assuming your current equation is: fieldname1+fieldname2
– Insert a “HTML Content” field in the form where will be displayed the solution as sentence, and enter as its content:
<div>Note: Your estimated due date is <span class="result-here"></span>. However, your actual due date could be 10 days before or after this estimated date.</div>
– Finally, edit the equation associated to the calculated field, as follows:
(function(){
var result = fieldname1+fieldname2;
jQuery('.result-here').html(result);
return result;
})()
Another possible alternative, that not requires to edit the equation, would be insert as the content of the “HTML Content” field the following piece of code:
<div>Note: Your estimated due date is <span class="result-here"></span>. However, your actual due date could be 10 days before or after this estimated date.</div>
<script>
jQuery(document).on('change', '[id *="fieldname6_"]', function(){jQuery('.result-here').html(this.value);});
</script>
Note: if you want hide the calculated field, because its result is displayed as part of the sentence, you simply should tick the checkbox: “Hide Field From Public Page” in its settings.
Best regards.
Perfect. Thanks so much. Your plugin is the best. I look forward to purchasing the Pro Version.