Reputation: 23
Cant get submit work of a contact form 7 shortcode. Form is correct displayed. But after submit redirects selft page without notices of successfully submission to database and no mail.
echo do_shortcode('[contact-form-7 id="36650" title="test"]');
i tried several things like this
if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
wpcf7_enqueue_scripts();
}
if ( function_exists( 'wpcf7_enqueue_styles' ) ) {
wpcf7_enqueue_styles();
}
and this
if(in_array('plugin-directory/plugin-file.php', apply_filters('active_plugins', get_option('active_plugins')))){
//plugin is activated
}
but no success the only thin what works is in frontpage copy the html code ofa shortcoded form and insert that in a admin plugin page and as fom action url use the frontpage url. This way it shows the form in admin and at submit it redirects to frontend and ubmit success but its not my really solution.i need it full in backend have someone idea?
Upvotes: 1
Views: 1035
Reputation: 184
I don't know this trick is method for you.
For my solution, I just make cf7 form in the front end page without any footer and header template and embed that with iframe on admin page.
I think this is the only solution to solve this.
Thank you,
Upvotes: 0