You want to be using the AJAX API instead of trying to load files directly. Even if you got that file to load, if it uses any WordPress functions it wouldn’t work anyway. If you load a theme file directly none of the WordPress Core will boot and so none of the function will be defined.
The Codex article should be sufficient for getting that working but this site is full of questions and answers concerning it. I have written about 30 at this point. See if you can’t get started and then refine the question if you run into trouble.
Related Posts:
- Using SMTP for outgoing mails (PHPMailer) on AWS instance?
- WordPress Contact Form 7: populate the value of a field dynamically with PHP [closed]
- Visitors Contacting Authors
- How to add a class for ninja form field_table?
- Report and Edit Post Link
- Newsletter, mailingList and contact management
- Contact Form 7 form is working on local wordpress install but fails on production server [closed]
- Contact form don’t send Email
- Is it possible to create a contact form without using a plugin?
- How to disable Page Preview on sidebar in Page Editor in backend of wordpress?
- Contact Form value=”e-mail address” doesn’t work
- Contact Form not working !
- Why doesn’t my contact form work? [closed]
- Contact form do not find submit.php file
- Contact Form 7 – Custom Validation
- Send a copy to yourself with Contact Form 7 in WordPress
- Contact Form on WordPress Sites?
- Contact form redirecting to page not found on send
- Removing “Website” Field from the contact info
- using 1 form shortcode (si or cf7) for all multisite sites [closed]
- Custom comment type maybe?
- Sending form data via PHPMailer – How to action PHP script from a form
- Contact Form 7 plugin refreshing page on submit [closed]
- After upgrading to PHP 7.0 my contact form outputs error
- WordPress registration and contact form 7 [closed]
- Contact forms going into spam folder
- other shortcodes in Contact form 7 MAILS [closed]
- How to get current user’s phone number
- How to change the contact info at the bottom of my theme [closed]
- Contact form sender email
- Creating a form contact page?
- Get Admin Email Address From External PHP page
- change captcha design in Fast Secure Contact Form plugin
- Get the name of all the Items of cart in current session
- Download any file after submitting a form [closed]
- Simple and customizable contact form with option to send copy to submitter [closed]
- Contact Form 7 Plugin send emails to my Gmail as spam [closed]
- Contact Form 7 – Uncaught TypeError: wpcf7.initForm is not a function [closed]
- Contact Form 7 Get Image Function [closed]
- Creating a contact form with Laravel frontend
- Can you disable the mail function in contact form 7 [closed]
- Make a form that will send email to all the authors in selected category [closed]
- Using Contact Forms to Send Private Information [closed]
- Contact form won’t submit
- Mail function is not working
- Is there a way to embed a Google Docs form in a page without using plugins?
- Trying do build a contact form
- Is Postfix required for WordPress contact forms in general?
- WordPress contact form 7 to show the form dropdown menus as like [closed]
- WordPress theme: Add page content to the bottom of the Contact form
- How can I redirect this contact form to a specific permalink
- Dynamic href link to Contact Page
- Contact Form Security
- how to insert a HTML form into a javascript popup?
- How do I add the same contact form to multiple wordpress sites and capture the response in one place or database?
- Email address used by website but I do not know where
- Saving contact form 7 data into custom Table
- advanced custom fields and contact form 7
- How to Send Confirmation Emails to Users after Form Submission?
- Contact Form 7 If Condition
- Display Freebie Page Content only if Referrer is from Form Page
- form action wordpress and php
- WordPress Emails & Contact Forms [closed]
- PHP- Why is my contact form keep showing it is invalid? [closed]
- contact form in template with jquery,validate and ajax
- Get value from db for custom contact form
- Contact Form 7 “non-selectable” options in a drop down [closed]
- Email from my theme’s contact form doesn’t get the reply-to address right
- Dashboard Contact Form
- My contact form – I’ve changed the source code but the changes are not being applied
- Making a Contact Form 7 calendar entry “required” [closed]
- How can I receive uploaded attach file as a Google drive link [closed]
- Contact form – problem with displaying message about sent mail
- Email form getting hacked
- Contact Form 7: conditional logic in e-mail
- Is it secure to use SMTP password in .php file in WordPress website?
- Elementor contact form doesn’t work: “Oops! I cannot send this email!”
- Why is my contact form not working?
- How could I change contact details in the footer?
- Contact Form 7 – multiple recepients
- How to direct contact form submission to a certain page
- How to track down a phantom contact form?
- How to send custom mail when a user complete a specific form
- Working with Contact Form 7 pipes
- How can I change the background color of a contact box? [closed]
- How to create admin ajax function for my contact form
- Using AJAX on Contact-form the WordPress way
- WordPress default contact form
- WordPress stops executing code after the require() method
- How to send email with wp_mail() with from email taken from contact form instead of the host?
- Contact forms not sending mails
- Use get_option with $emailTo on contact page
- how to create or rewrite files in wordpress plugin folder
- How do I display page content next to a contact form, rather than under it?
- widgets in contacts only
- custom contact form no longer working (because of 3.2?)
- Removing Facebook contact field from user contact not working
- How to add contact form instead of checkout
- Plugin Beauty Contact Popup Form with while loop
- Send button using own contact form [closed]