07 - Formcarry Contact Form

November 25, 2021

WARNING: This post is over a year old. Some of the information this contains may be outdated.

Register on Formcarry.

Get your Formcarry ID, go to config.php and add your ID under the services key.

<?php

return [
    // ...
    'services' => [
        'formcarry' => 'XXXXXXXXXXXX',
    ],
    // ...
];

Go to source/_assets/js/contact.js and change fakeSend(contactForm) to send(contactForm) in the lines shown below.

e.preventDefault();
e.target.elements['submit'].disabled = true;

fakeSend(contactForm) // edit this line
    .then((response) => {
        notyf.success('Your message has been sent.');
        contactForm.reset();
    })

And finally, remove this line.

const fakeSend = () => new Promise((resolve) => setTimeout(resolve, 2000));

Para comentar acesse a sessão abaixo.