There isn't a way to execute that in LFForm JS. We currently block the "allow-modals" sandbox attribute that would enable this. I can look into feasibility of this in the future.
For now, if your users are used to the print button you could keep it but make it show a tooltip instead:
.tooltip-toggle {
display: none; /* Hide the checkbox */
}
.tooltip-invoke {
border: 1px solid black;
padding: .25rem .75rem;
}
.tooltip-content {
display: none; /* Hide the tooltip by default */
/* Add styling here (positioning, background, etc.) */
position: absolute;
background-color: #333;
color: white;
padding: 10px;
border-radius: 5px;
z-index: 10;
}
/* Show the tooltip when the checkbox is checked */
.tooltip-toggle:checked ~ button + .tooltip-content,
.tooltip-toggle:checked ~ .tooltip-content {
display: block;
}
<label class="tooltip-wrapper">
<input type="checkbox" class="tooltip-toggle" id="tooltip-toggle">
<div class="tooltip-invoke">Print</div>
<span class="tooltip-content">
Please use ctrl+p or cmd+p to print
</span>
</label>