Also, just attempted to use 1.6.7d and used the shortcode
[print-me target="div#printableArea" title="Print Form"]
Plugin Author
Baden
(@baden03)
the id of the div is ninja_forms_form_5_wrap
in css the selector for the id of an element is an hash: #
therefore the selector would be #ninja_forms_form_5_wrap
[print-me target="#ninja_forms_form_5_wrap" title="Print Form"]
Didnt work,
Had a dev at work look into it, he noticed Jquery was not called on the ninja forms success page, which left your plugins click handler unbound.
We tried a hacky way to get a minified jquery into your js file but just copy pasting the minified jquery text directly into your js. but that made things worse.
Using Console he was able to get it to run once, but this is of course not a permanent fix, just a proof of concept.
Anyway you can make it so your plugin checks to see if jquery is loaded and if not, load it?
Or put of option in the settings like you do for the jquery clone fix?
Plugin Author
Baden
(@baden03)
if jQuery is not being called the ninja forms success page you have a much larger issue with your theme.
Anyway you can make it so your plugin checks to see if jquery is loaded and if not, load it?
I assure you, it is doing this.
You might want to have your dev look into the basic WordPress Troubleshooting process.
Switch to default theme, test. still broke?
check to make sure wp_header(); and wp_footer(); functions are being called on the page in question.
Sorry but this is beyond the scope of supporting this plugin.
Good Luck
I will attempt to change the theme, but im using Baskerville, a pretty common and WP supported theme. Would you mind looking at the actual URL and submitting the form? see if you can make heads or tails of it, the Dev is not a WP expert so maybe we came up with the wrong conclusion.
P.s. Just switched to twenty fourteen and twenty fifteen themes with identical results.
I am sure we can figure this out, i am more than willing to purchase the pro-version if that will assist in anyway, but i dont want to spend the money on a plugin that wont work with what i am trying to do.
Plugin Author
Baden
(@baden03)
Going pro would only have provided you with support that would have owned this problem.
After taking a closer look, here is the issue:
the Ninja Form ‘results’ page is not an actual page, it’s content that is being inserted dynamically via Ajax. Since your print button is actually part of the form and NOT part of the page, all the details that would have been inserted on the page when it was initially rendered are missing. But ah-ha! we have a work around for that.
1. download the latest release candidate version 1.6.7d for print-o-matic
from GitHub: https://github.com/baden03/print-o-matic
on the PAGE where you inserted the ninja form shortcode
insert the following:
[print-me id="my_print_trigger" printstyle="external"/]
This will insert only the required scripts and details on initial page.
Notice you must assign it a unique id
Now on your FORM RESULTS page, where you currently have the shortcode placed, assign it the SAME id: my_print_trigger
[print-me id="my_print_trigger" target="##print_me_please" title="Print Form"]
Let us know how that works out for you.
No joy…
I have taken the liberty of providing screen shots of my Online-entry page set up, the forms success message page, and the plugins settings, attached below in respective order.
Page: https://i.imgur.com/Elg2f6M.png
Forms Success Page: https://i.imgur.com/Elg2f6M.png
Plugin Settings: https://i.imgur.com/zIyCftn.png
I wasn’t sure if the double hashtag was a mistake so i added the entry twice, one with a single hashtag and one as you submitted.
I truly do appreciate your efforts with this.
How did this get marked resolved? It is still not working.
Plugin Author
Baden
(@baden03)
open up a support issue with Ninja Forms and see if they provide a callback on successful Ajax content load.
I requested this months ago, they said they would not make any changes just for the point of making your plugin work.
Maybe you, or your team should reach out to them and see if you guys can collaborate on a solution. Seems like Developers from both teams could come up with a solution faster and better than each team working (or not working in this case) on separate solutions or trying to get your customers (or potential customers) to get solutions developed.
Plugin Author
Baden
(@baden03)
it’s not about ‘just making our plugin work’.
They should provide a callback if they are pulling content dynamically.
We’ll contact them and see what we can find out.
Plugin Author
Baden
(@baden03)