This is a Dr. Frankenstein experiment with Contact Form 7’s Submit button and the Print-O-Matic Print button. In theory, when submitting this form, the form should also also force-launch the print dialogue. Years of working in UI tells us NOT do this, but hey, people still have music playing on page load, so what do we know.
[[contact-form-7 id="1018" title="SubPrint"/]]
To cross-breed the Submit button with the print-o-matic print trigger, use the roll-your-own method as follows:
- create a cf7 submit/print button by assigning it a unique ID (in this case subprint) and a class of printomatic.
[submit id:subprint class:printomatic]
-
manually insert a hidden input that has the ID of “target-
” and a value of the target you wish to print.
<input type="hidden" id="target-subprint" value=".wpcf7-form" />
-
be sure the ‘Shortcode Loads Scripts’ checkbox is NOT checked in the plugins options page.
Update: This is no longer supported in the current version of print-o-matic. Here is how to implement this solution with print-pro-matic.
Hello,
I have added your code but it doens’t work for me. When is press submit the printomatic page will be blank. I hope you find the solution for me.
Thanks,
Cees
Issue has been addressed on the WordPress Forums here:
https://wordpress.org/support/topic/combine-print-button-and-submit-button?replies=4 If you need further support, please open your own thread.