Hello @talentoracle,
You simply should insert a “HTML Content” field in the form with the following piece of code as its content:
<style>
@media print{
#fbuilder .pbreak{display:block !important;}
}
</style>
and that’s all.
Best regards.
Thank you very much but regretfully this did not work. I made no changes to the following print code or the print button. I only added the code mentioned from your response in a HTML Content field and tried it twice. The result is to print only the final page as it was previously.
<SCRIPT>
function printForm(){
var w = window.open(null, ‘Print_Page’, ‘scrollbars=yes’);
jQuery(‘#fbuilder input’).each(function () {
var e = jQuery(this);
e.text(e.val()).attr(‘value’, e.val());
if (e.hasClass(‘large’))
e.css(‘width’, ‘100%’);
if (typeof e.prop(‘checked’) != ‘undefined’ && e.prop(‘checked’))
e.attr(‘CHECKED’, e.prop(‘checked’));
});
var html = jQuery(‘#fbuilder’).html();
jQuery(‘#fbuilder TEXTAREA’).each(function () {
var e = jQuery(this).parent().html();
html = html.replace(e, jQuery(this).val());
});
jQuery(‘#fbuilder SELECT’).each(function () {
var e = jQuery(this).parent().html();
html = html.replace(e, jQuery(this).find(‘option:selected’)[0].text);
});
w.document.write(html);
w.document.close();
w.print();
}
</SCRIPT>
Hello @talentoracle,
Please, indicate the URL to the webpage where the form is inserted.
By the way, the code for printing the form in “Calculated Fields Form” website was included only to demonstrate the potential of the plugin, I recommend you to use the “Print Form” block distributed with the “CP BLocks” plugin instead (remember to remove the current Print Form routine before insert the new one):
https://ww.wp.xz.cn/plugins/cp-blocks/
Best regards.
This note is only to assist anyone else with this issue in the future. If your site is hosted on wordpress.com, cp-blocks won’t work since it contains javascript.
Hello @talentoracle,
I sent you an alternative through the private support system.
Best regards.