reset forms on site reload
All checks were successful
deploy / build-and-deploy (push) Successful in 16s

This commit is contained in:
bytedream 2025-05-24 23:52:27 +02:00
parent ce6325e8dd
commit a9a70b74e9
2 changed files with 7 additions and 1 deletions

View File

@ -37,6 +37,9 @@ import Input from '@components/input/Input.svelte';
const content = document.getElementById('content') as HTMLTextAreaElement;
const email = document.getElementById('email') as HTMLInputElement;
// reset form on site (re-)load
form.reset();
type.addEventListener('change', () => {
if (type.value === 'website-feedback') {
// content input

View File

@ -175,9 +175,12 @@ const signupDisabledSubMessage = signupSetting[SettingKey.SignupDisabledSubMessa
// add click handler to open rules popup when clicking the rules link in the rules checkbox label
rulesCheckboxRulesLink!.addEventListener('click', () => rulesPopupState.set('open'));
/* send signup */
/* ----- signup form ----- */
const form = document.getElementById('signup')! as HTMLFormElement;
// reset form on site (re-)load
form.reset();
async function sendSignup() {
const { data, error } = await actions.signup.signup({
firstname: form.firstname.value,