feat: add x handle and reason to the form
This commit is contained in:
parent
ab73b61246
commit
520ab42c65
|
@ -22,6 +22,9 @@
|
|||
const name = form.querySelector("#form-name").value;
|
||||
const email = form.querySelector("#form-email").value;
|
||||
|
||||
const x = form.querySelector("#form-x");
|
||||
const reason = form.querySelector("#form-reason").value;
|
||||
|
||||
const res = await fetch(
|
||||
`https://odoo.logos.co/website_mass_mailing/subscribe2`,
|
||||
{
|
||||
|
@ -35,6 +38,8 @@
|
|||
params: {
|
||||
value: email,
|
||||
name: name || "",
|
||||
x: x || "",
|
||||
reason: reason || "",
|
||||
list_id: 12,
|
||||
subscription_type: "email",
|
||||
},
|
||||
|
|
|
@ -66,9 +66,11 @@ main > div > div:first-child {
|
|||
|
||||
.apply-form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-top: 24px;
|
||||
gap: 12px;
|
||||
width: 270px;
|
||||
}
|
||||
|
||||
.apply-input {
|
||||
|
|
|
@ -13,7 +13,9 @@ export const commands: Record<
|
|||
const htmlString = `<template>
|
||||
<form class="apply-form" onsubmit="handleSubmit(event)">
|
||||
<input class="apply-input" id="form-name" placeholder="Name or pseudonym" />
|
||||
<input class="apply-input" id="form-email" placeholder="Email address" type="email" required />
|
||||
<input class="apply-input" id="form-email" placeholder="Email (required)" type="email" required />
|
||||
<input class="apply-input" id="form-x" placeholder="X handle" />
|
||||
<input class="apply-input" id="form-reason" placeholder="Why do you want to join?" />
|
||||
<button class="apply-submit">Submit</button>
|
||||
</form>
|
||||
</template>`;
|
||||
|
|
Loading…
Reference in New Issue