From b7ed4761992f6f4bd9848f89747e5cc5779a2a46 Mon Sep 17 00:00:00 2001 From: Andrew Daniel Janong <111191141+AndrewJanong@users.noreply.github.com> Date: Mon, 11 Nov 2024 16:58:10 +0800 Subject: [PATCH] Enhance contact us form with file upload (#52) * Created message box in contact us forms * Modify CSS and make responsive * Implement email sending using formsubmit.co * Added padding to input components * Resolve different package-lock.json * Add .env.example * Allow file uploads in business form * Modify inconsistent stylings --------- Co-authored-by: izruff --- app/components/contact-us/business-form.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/components/contact-us/business-form.tsx b/app/components/contact-us/business-form.tsx index 521817c..e1c1f06 100644 --- a/app/components/contact-us/business-form.tsx +++ b/app/components/contact-us/business-form.tsx @@ -8,39 +8,41 @@ export default function BusinessForm() { const [category, setCategory] = useState(""); const [message, setMessage] = useState(""); + const formSubmitKey = process.env.NEXT_PUBLIC_FORMSUBMIT_KEY; + return (

Contact Us

Feel free to reach out through the form below!

-
+
setName(e.target.value)} required - className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"/> + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 focus:outline-none"/>
setEmail(e.target.value)} required - className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"/> + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 focus:outline-none"/>
setPhoneNumber(e.target.value)} required - className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"/> + className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 focus:outline-none"/>
-
- setCategory(e.target.value)} required + setCategory(e.target.value)} required accept=".pdf" className="block w-full rounded-md border-0 px-2 sm:px-3.5 py-1.5 sm:py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"/>