fixed contact form
This commit is contained in:
parent
5758185518
commit
710ebb6031
|
@ -40,7 +40,14 @@
|
|||
</script>
|
||||
|
||||
<div id="mt-form" class="form text-lg w-full">
|
||||
<form id='form' onsubmit="submitForm(event)" autocomplete="on" method="post" target="_parent" class="w-full items-center flex flex-wrap">
|
||||
<form id='form'
|
||||
hx-post="/api/contact-form"
|
||||
hx-encoding="multipart/form-data"
|
||||
autocomplete="on"
|
||||
method="post"
|
||||
target="_parent"
|
||||
class="w-full items-center flex flex-wrap">
|
||||
>
|
||||
<h3 class="basis-full">Contact Form</h3>
|
||||
<div class="basis-full flex flex-wrap my-4">
|
||||
<label for="firstname" class="basis-full">What is your name? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label>
|
||||
|
|
|
@ -125,7 +125,7 @@ pub async fn contact_form(MultipartForm(mut form): MultipartForm<ContactForm>) -
|
|||
Ok(_) => info!("Successfully sent email"),
|
||||
Err(e) => error!("There was an error sending the email: {e}"),
|
||||
}
|
||||
HttpResponse::Ok().body("thankyou")
|
||||
HttpResponse::Ok().body("Thank you! We will get back with you shortly!")
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Reference in a new issue