Submit form from Backend in contact form 7 - wordpress

I need help I R & D many contact form plugin's but not found any one working
My requirements are I want contact form to be submitted by Front end as well as backend
[contact-form-7 id="345"]
If I used this above shortcode in backend it display error
Please Help
Is their any way to add new tab on contact form 7 plugin and submit contact form 7 from admin dashboard
Thank You For Help In advance

First of all insert a contact form shortcode into your template file directly. You will need to pass the code into do_shortcode() function.
For Example:
<?php echo do_shortcode('[contact-form-7 id="345"]'); ?>

Related

getting Custom field value in contact form 7 in wordpress

in my website i have a page that shows the job openings. Each job opening is done it as post. So when you click on a job opening it will goes to the detail page and shows the full details.All the job detail page have a unique job id and it is entering using a custom field in the admin using toolset. Then all the detail page have a contact form also for send there resume.so what i need is when sending the mail i need to pass the job id as an hidden field and it should be shown in the mail.
what i tried is
1
<?php echo do_shortcode( '[contact-form-7 id="983" title="contact 1" job ID="'.get_field( 'job-id' ).'"]' ); ?>
i tried this for getting the custom field value along with the shortcode....
i also tried this
2
[hidden hidden-948 "wpcf-job-id"]
i tried this to get the custom field value in the contact form 7 itself but both the codes didn't work for me .....
is there any way to get the custom field value in contact form 7....
Thanks in advance
You Can use this plugin to add custom fields in contact form 7 form
https://wordpress.org/plugins/advanced-custom-fields-contact-form-7-field/

Generate custom dynamic URL in Contact Form 7 body

I need to add in the contact form body a custom filter. I was reading through the custom code to be written in functions.php but I wasn’t clear on how to use it for my case.
I have the following situation. I have yith plugin which has this code
<?php echo apply_filters( 'yith_wcwl_email_share_body', urlencode( $share_link_url ) ) ?>
This code generates a specific URL that can be shared in social networks and by email. I want to send this URL not through the share function, but as a part of the Contact Form 7.
Can anyone help me implement this code so the dynamically generated url from this code will be sent by email when Contact form 7 is compiled and sent?

CFDB plugin : Preventing Duplicate Submissions from CF7

I have a form where user add his email address, I’m trying to prevent users to enter there email many times. I use "contact form to database plugin" to save email address and export them to excel. while searching on internet I found this solution (link below) but I can’t get it work can you help me please :
https://cfdbplugin.com/?page_id=904
Thanks
I found the solution,
in the line where you put the name of the form you should put the title of the form (line bellow ) :
$formName = 'email_form'; // Change to name of the form containing this field
so, for exemple if we have created with the contact form 7 a form here is the shortcode that we will have :
<?php echo do_shortcode( '[contact-form-7 id="69" title="Email_form" html_name="my_form"]' ); ?>
what I did is I put the value of html_name in the script of CFDB but when I changed to the value of title it works

WordPress contact form 7 redirection

I want redirect contact us form 7 , for different pages,
I have multiple custom posts, and I want that when the user wants to read this, then first fill a form, and then redirect to full page. I want this process for every single post.
My test case can be seen here.
I am doing this:
on_sent_ok: "location.replace('http://polestarllp.com/casestudy/benefits-of-sql-on-hadoop/');"
But this is for only one page.
If it doesn’t work, check if Ajax is correctly working on your site.
follow this link
http://contactform7.com/redirecting-to-another-url-after-submissions/
For redirecting your contact form after submission . This is perfect method ,
on_sent_ok: "location.replace('http://polestarllp.com/casestudy/benefits-of-sql-on-hadoop/');"
But if you getting any issue then you can use redirection addon for contact us plugin .may be these link help you.
1:https://wordpress.org/plugins/tags/redirect-cf7/
2:https://github.com/anup04sust/Contact-Form-7-Redirect/blob/master/contact-form-7-redirect.php
3:https://github.com/kasparsd/contact-form-7-extras/blob/master/plugin.php
you need to call post id instead of this link ('http://polestarllp.com/casestudy/benefits-of-sql-on-hadoop/')
on_sent_ok: "location.replace('<a href="'. get_permalink($post->ID) . '"');"
hope it will work for you

wordpress contact 7 URL Redirect with target=_blank

i wan to redirect my form after submit it i found the code which will do that
on_sent_ok: "location.replace('http://www.YOURSITE.com');"
but here is the twist i want redirect url with target blank .it means when visitor submit a form it will open a new page with target="_blank" link in contact 7 form of wordpress
please help me in it
Thanks
You have to use client-side code, like javascript.
hope this code helps
<?php
if(condition==true) {
?>
<script>
window.open("http://www.example.com");
</script>
<?php } ?>
I can't add comments. but just to clear this: if You use Contact Form 7 plugin you just need to paste the following in Additional settings tab of your form:
on_sent_ok: "window.open('http://example.com/');"
http://example.com/ is your URL off course.
But note, that you may have problems with browser popup settings,
because new tab is opening without user action/permission.

Resources