seangray-dev / formail-app

Formail offers a streamlined approach to form management, enabling instant notifications and dynamic data handling without pre-structured forms. Ideal for developers, small businesses, and anyone needing efficient form submission management, Formail simplifies the process, making it accessible and user-friendly.
https://www.formail.dev
MIT License
1 stars 0 forks source link

feat: Support for form actions on submissions #49

Closed seangray-dev closed 4 months ago

seangray-dev commented 4 months ago

Description Our platform currently lacks the capability for users to define the action attribute in their HTML forms. Enabling this feature will empower our users, especially those without technical expertise in JavaScript, to directly specify a custom submission endpoint for their forms. This is particularly beneficial for users who prefer not to use JavaScript or our specific form handling libraries.

Proposed Change We propose to implement functionality that allows users to specify their submission endpoint directly within an HTML form via the action attribute. For example, users can set up their form as follows:

<form action="https://formail.dev/submit/<form-id>" method="post">
    <!-- form elements here -->
    <button type="submit">Submit</button>
</form>

Expected Benefits This update will offer several advantages:

Considerations Security Measures: We must ensure that action URLs are strictly validated to prevent submissions to unauthorized endpoints. Compatibility with Security Protocols: The implementation should maintain compatibility with CORS and CSRF protections to safeguard against common web vulnerabilities. Analytics Integrity: We need to assess the impact on our analytics and tracking systems to ensure that submission data remains accurate and actionable.

seangray-dev commented 4 months ago

Documentation will also need to be updated to reflect that we support this