I liek free API stuff so I built this website suited for portfolio websites for form message handling.
Seamlessly connect your form to our service without the hassle of managing server-side code. Focus on building your website, and let us handle the backend logistics—quick, secure, and reliable.
Enjoy the flexibility to use your preferred technology, from simple HTML/CSS to advanced React setups. Our service adapts to your tech stack, making integration smooth and worry-free.!
Get up and running in under 20 minutes! With intuitive instructions and a streamlined setup process, adding a contact form to your site has never been simpler.
<!-- index.html -->
<div class="contact-form">
<form id="contact-form" onsubmit="">
<input id="name" name="name" type="text" placeholder="Enter Your Name" required>
<input id="email" name="email" type="email" placeholder="Enter Your Email" required>
<textarea id="message" name="message" cols="40" rows="5" placeholder="Enter Your Message" required></textarea>
<input type="submit" value="Submit" class="send">
</form>
</div>
// main.js
const form = document.getElementById('contact-form');
form.addEventListener('submit', async (event) => {
event.preventDefault();
const name = document.getElementById('name').value;
const email = document.getElementById('email').value;
const message = document.getElementById('message').value;
const url = 'https://imessageplex.com/en/user/message/{YOUR_USERNAME}';
const response = await fetch(url, {
method: 'POST',
body: JSON.stringify({
name,
email,
message,
apiKey: {YOUR_API_KEY (Make sure to hide this with ENV)},
}),
});
if (response.ok) {
alert('Message was sent successfully!');
}
});