Compare commits

...

2 Commits

Author SHA1 Message Date
3a11b00fd5 feat(contact-form): add consent checkbox for data processing agreement
All checks were successful
CI / test (3.11) (push) Successful in 49s
CI / build-image (push) Successful in 2m12s
2025-10-31 00:24:09 +01:00
dc3a888da3 docs: update README to include CORS support for embeddable forms 2025-10-30 13:09:07 +01:00
2 changed files with 7 additions and 1 deletions

View File

@@ -83,7 +83,7 @@ Access the admin interface at `http://127.0.0.1:5002/auth/login` using the confi
## Embeddable Forms
The application provides embeddable contact and newsletter subscription forms that can be integrated into other websites via iframe.
The application provides embeddable contact and newsletter subscription forms that can be integrated into other websites via iframe. CORS (Cross-Origin Resource Sharing) headers are automatically added to API endpoints to allow forms embedded on external sites to submit data successfully.
- `GET /embed/contact`: serves an HTML page with a contact form that can be embedded in an iframe on external sites.
- `GET /embed/newsletter`: serves an HTML page with a newsletter subscription form that can be embedded in an iframe on external sites.

View File

@@ -22,6 +22,12 @@
<label for="message">Message:</label>
<textarea id="message" name="message" required></textarea>
</div>
<div class="form-group">
<label for="consent"
>I agree to the processing of my submitted data.</label
>
<input type="checkbox" id="consent" name="consent" required />
</div>
<button type="submit">Send Message</button>
</form>
<div id="responseMessage"></div>