Template marketplaces
Make an Envato Elements template's contact form work
Short answer
For an HTML template, set the form action to your WebForms endpoint and add dataType: "json" to its jQuery submit script. For an Elementor template kit with Elementor Pro, add a Webhook action to the Form widget with your endpoint as the URL. Either way the submissions are emailed to you and stored.
Envato Elements gives you two kinds of website template: HTML templates, which usually ship a PHP contact script, and Template Kits for WordPress and Elementor, which rely on a form plugin. Elements does not include support from the template's author, so when the contact form does not send, you are on your own. WebForms gives both kinds a working form without PHP or a paid form add-on.
Setup
Create a form and copy its endpoint
Sign up, create a form, and copy the endpoint URL. Submissions are emailed to your verified address by default.
HTML template: change the form action
Open the contact page, find the
<form>and replace itsaction(for examplephp/contact.php) with your endpoint. Keepmethod="POST"and the field names.HTML template: fix the submit script
If the form submits without a page reload, add
dataType: "json"to the$.ajaxcall in the template's script and showresponse.messageon success. See the ThemeForest guide for the common script patterns.Elementor kit: add a Webhook action
Edit the page in Elementor, select the Form widget, open
Actions After Submit, addWebhook, and paste your endpoint as the Webhook URL. Leave the form's redirect in WebForms empty, because Elementor only accepts a 200 reply.Send a test
Submit the form on the live site. The submission appears in your inbox and the WebForms dashboard within seconds.
Envato Elements examples
Swap in your own endpoint and these run as-is.
<!-- contact.html: only the action changes -->
<form id="contact-form" action="https://send.webforms.to/wft_your_key" method="POST">
<input type="text" name="name" placeholder="Your name" required>
<input type="email" name="email" placeholder="Your email" required>
<input type="text" name="subject" placeholder="Subject">
<textarea name="message" placeholder="Message" required></textarea>
<!-- Optional: WebForms reads these -->
<input type="hidden" name="_subject" value="New enquiry from the website">
<input type="text" name="_gotcha" tabindex="-1" autocomplete="off"
style="position:absolute;left:-9999px" aria-hidden="true">
<button type="submit">Send message</button>
</form>The jQuery change most Envato HTML templates need:
// js/ajax-mail.js (or contact.js): the usual jQuery handler
$(form).submit(function (e) {
e.preventDefault();
$.ajax({
type: "POST",
url: $(form).attr("action"), // now your WebForms endpoint
data: $(form).serialize(),
dataType: "json" // add this: asks WebForms for JSON
})
.done(function (response) {
$(formMessages).removeClass("error").addClass("success");
$(formMessages).text(response.message); // was: .text(response)
$(form)[0].reset();
})
.fail(function () {
$(formMessages).removeClass("success").addClass("error");
$(formMessages).text("Sorry, your message could not be sent. Please try again.");
});
});Settings for an Elementor Pro Form widget:
Actions After Submit: Webhook Webhook URL: https://send.webforms.to/wft_your_key Advanced Data: Off (sends each field as "Label: value")
Why the template's contact form does not send
Most marketplace HTML templates post the form to a PHP file that ships with the template, such as contact.php, mail.php, php/contact-form.php or bat/rd-mailform.php. That script calls PHP's mail function or PHPMailer to send you an email. It only works on a server that runs PHP and is allowed to send mail.
Static hosting runs no PHP at all, so on hosts like GitHub Pages and Netlify the POST fails, often with 405 Not Allowed. Some cloud providers, DigitalOcean among them, block outgoing mail ports by default. Shared hosting that does run PHP can still send these emails to spam, because they come from the web server rather than a real mail domain.
Pointing the form at a WebForms endpoint removes the PHP step. The submission goes to WebForms, which checks it for spam, stores it, and emails it to you, or sends it to Slack, Discord, Telegram or a webhook on Pro.
Elementor template kits and form plugins
Most Envato Elements template kits are built for free Elementor plus a form plugin such as MetForm, and say that if you have Elementor Pro you can use its Form widget instead. MetForm only sends to an outside URL on its paid Agency plan.
Elementor Pro's Form widget has a Webhook action. It posts each field from your WordPress server, labelled with the field's label, plus the page URL and date. Elementor's form integrations need its Advanced plan or above for subscriptions started since December 2023.
With the Webhook action pointing at WebForms, every submission is stored and spam filtered outside WordPress, emailed to you, and on Pro sent to Slack, Discord, Telegram or your CRM.
Worth knowing
- Envato Elements does not include author support for downloaded items, so the template's own documentation is the only help it comes with.
- Elementor's webhook treats anything other than a 200 reply as an error. WebForms answers 200 unless the form has a redirect set, so leave the redirect empty for an Elementor form.
- The Elementor webhook is sent from your WordPress server, not the visitor's browser, so WebForms' honeypot and time trap do not apply to it. The AI classifier and blocklists still check every submission.
Envato Elements form FAQ
HTML templates post to a PHP mail script that needs a server running PHP with mail allowed, which static hosting does not have. Template kits need a form plugin, and sending to an outside URL is often a paid feature. Pointing the form at WebForms fixes both.
For the Webhook action, yes, on the Advanced plan or above for newer subscriptions. Without Elementor Pro, add an HTML widget with a plain form that posts to your WebForms endpoint.
Yes. Many items are listed on both, with the same code, and the steps are the same.
No, Elementor sends it form-encoded from your server, with each field labelled by its label. WebForms accepts form-encoded, multipart and JSON submissions, so nothing needs converting.
Related guides
Where Envato Elements submissions can go
The guide above gets the submission to your endpoint. From there it can land anywhere: one destination on Free, several on Pro.
Need the form markup too? The template gallery has complete forms for contact, waitlist, job application and more, and the form generator builds one field by field.
Ready to wire up your Envato Elements form?
Free for 300 submissions a month. Endpoint in under a minute, no card required.
Start free