Add a NinjaDemo Form on External Domain
At Sprout Apps we’re going to be using the awesome NinjaDemo plugin but we wanted to allow for a demo to be created without directing them to the bland demo site running Twenty Twelve :).
Here’s the solution I came up with:
Add some AJAX handlers on the WPMU demo site running NinjaDemo. I wish NinjaDemo would provide these built in at some point but before that I’d like to see them allow for some attributes to be passed to Ninja_Demo_Shortcodes->try_demo(): add the domain in the form action (home_url()), add some classes to the submit form and change the submit button value.
Modify the allowed domains so that cross domain AJAX requests can be made.
After activating the example plugin above, a shortcode can be used on your main domain (or site you want to add the NinjaDemo form).
Make sure to modify the demo_url!
I know only a few could use this but I hope they find it useful.
Leave A Comment