From ee6a4b1447ad6fe2d3612ff7b8aa0de375fea8a0 Mon Sep 17 00:00:00 2001 From: VividTruthKeeper Date: Thu, 21 Apr 2022 13:41:41 +0500 Subject: [PATCH] new form header to api --- src/pages/ContactUs.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pages/ContactUs.js b/src/pages/ContactUs.js index 65cc39f..4dfafb5 100644 --- a/src/pages/ContactUs.js +++ b/src/pages/ContactUs.js @@ -34,6 +34,7 @@ const ContactUs = () => { const [isLoading, setIsLoading] = useState(false); const [inputValid, setInputValid] = useState({ message: false, + type: null, captcha: false, }); const [btnEnabled, setBtnEnabled] = useState(false); @@ -104,6 +105,14 @@ const ContactUs = () => { } stateSetter={(e) => { setTopic(e); + if ( + e === "Пластиковые карты" || + e === "Plastik kartlar" + ) { + setInputValid({ ...inputValid, type: true }); + } else { + setInputValid({ ...inputValid, type: false }); + } }} eTarget={true} customId={"topic"} @@ -151,6 +160,8 @@ const ContactUs = () => { setIsLoading(true); formData.append("subject", topic); formData.append("message", inputValid.message); + formData.append("type", inputValid.type); + console.log(inputValid.type); let today = new Date(); let dd = String(today.getDate()).padStart(2, "0"); let mm = String(today.getMonth() + 1).padStart(2, "0");