How can I create a feedback page for my website?

I wanted to create a page (I know how to make a HTML page) where users can give feedback and when they press a button it could send an Email to my Gmail account.

1 Like

need wb.site

what is that

What language are you using? If you’re using node.js as a backend you can try reusing some of the code from the hello-email template I made a couple of years ago.

If you’re using a static site, you can use a mailto link, but I personally don’t like them as it will open the default mail client on your device and people might not always have that setup.

Here is an example that takes advantage of the mailto links:

<!DOCTYPE html>
<html>
<head>
    <title>Contact Us</title>
</head>
<body>
    <h2>Leave some feedback</h2>
    <p>Use this form to give us some feedback</p>
    <form action="#" method="post" id="feedbackform">
        <label for="name">Name:</label>
        <input type="text" id="name" name="name" required><br><br>
        
        <label for="email">Email:</label>
        <input type="email" id="email" name="email" required><br><br>
        
        <label for="message">Message:</label><br>
        <textarea id="message" name="message" rows="4" required></textarea><br><br>
        
        <input type="submit" value="Submit">
    </form>
    
    <script>
        const form = document.querySelector('#feedbackform');
        form.addEventListener('submit', function (e) {
            e.preventDefault();
            const email = document.querySelector('#email').value;
            const message = document.querySelector('#message').value;
            window.location.href = `mailto:bob@gmail.com?subject=New Feedback Message from ${name}&body=From ${email}%0A%0A${message}`

        });
    </script>
</body>
</html>

It opens up the mail client, so it works. I’m just trying to find out why it doesnt work with gmail

Only issue I see is that not every user will have a mail app setup on their computer, but if it works for your usecase, that’s great!

If you mail the G-mail web app, you’ll need to register it as a mailto link handler. This is a good article you can read on how to register it.

ok thank you!

1 Like

this is the page Contact us

1 Like

Hello. I checked out your link and I’ve checked out the website a couple of times before. I noticed that some input boxes are larger than others. I’m making a website and I need help sizing the input boxes. How did you do this?

hold on, the last message glitched so i deleted it

you can edit it with CSS. You put the id of the input box after an “#” then put {) where you can then change the style of it. For example:
Screenshot 2023-12-01 200507

Alright. Is there a way to center the text to the top and make it “line loop”( I forget what it’s called)