Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Printing a Form
Printing a Form
In the browse view there's a Print Button but in an edit form not. How can I make it appear there as well? And ideally, the breadcrumbs and action buttons shouldn't be printed.
Re: Printing a Form
Timo,
The Print button creates an HTML page containing all the records in the current way the data it is filtered and sorted.
That HTML page can then be printed or imported into a spreadsheet.
If you want to print an Edit Page just hit print screen or some other utility to print the screen.
Steven
The Print button creates an HTML page containing all the records in the current way the data it is filtered and sorted.
That HTML page can then be printed or imported into a spreadsheet.
If you want to print an Edit Page just hit print screen or some other utility to print the screen.
Steven
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: Printing a Form
Timo, this should do the job:
// add a Print Button to the Edit Form
// hide some elements before calling the print dialog
// add a Print Button to the Edit Form
Code: Select all
if (nuFormType() == 'edit') {
nuAddActionButton('nuPrintEditForm', 'Print', 'custPrintEditForm();');
}
Code: Select all
function custPrintEditForm() {
function setElementsVisiblity(v) {
$("#nuBreadcrumbHolder").css("visibility", v ? "visible" : "hidden");
$("#nuTabHolder").css("visibility", v ? "visible" : "hidden");
$(".nuActionButton").css("visibility", v ? "visible" : "hidden");
}
setElementsVisiblity(false);
window.onafterprint = function (e) {
$(window).off('mousemove', window.onafterprint);
setElementsVisiblity(true);
};
window.print();
setTimeout(function () {
$(window).one('mousemove', window.onafterprint);
}, 1);
}
-
- Posts: 49
- Joined: Wed Aug 26, 2020 10:38 pm
Re: Printing a Form
Hi, thanks for this solution to printing the edit form. Do you know if there's a way to print multiple records in the "edit form" format? Ideally I would like to be able to do a search in the browse form and then print a separate page for every record (row) returned.
-Ben
-Ben
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact: