Skip to content

BUG: Contact form redirects to mail client instead of processing submission internally. #29

@ayushHardeniya

Description

@ayushHardeniya

Describe the bug
The Contact Us form on the /contact page is configured incorrectly and uses a mailto: action upon submission. This results in the user being redirected away from the website to their local mail client (e.g., Outlook, Apple Mail, Gmail composer) instead of processing the message internally via our server-side API.

To Reproduce
Steps to reproduce the behavior:

Go to the 'Contact Us' page (e.g., /contact).
Fill in all fields (Name, Email, Message) with test data.
Click on the 'Send Message' or 'Submit' button.

See error: The browser attempts to open the user's default email application, and the submission is not registered on the website.

Expected behavior
The form submission should be handled asynchronously (e.g., via a modern fetch or AJAX request) to a designated API endpoint. The user must remain on the /contact page, and a confirmation pop up or success banner should appear to confirm the message was sent.

Screenshots (optional)

Image

After clicking on **Submit** button:

Image

Additional context
This bug is likely caused by setting the HTML

attribute to a mailto: link. This needs to be changed to prevent the default form submission behaviour and implement a modern JavaScript solution for script submission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions