Commit 4253a47a by sujata

zoho form data integration -check

1 parent f174945f
......@@ -62,6 +62,36 @@ const CallBackRequest = () => {
}
// zoho form
// try {
// const zohoFormUrl =
// "https://forms.zohopublic.in/services10/form/ContactUs/formperma/bJVh0UBQ6gjwfELMYAzkqMf5pfIyed3eJcjfSaEXmVg/htmlRecords/submit";
// const zohoForm = new FormData();
// zohoForm.append("zf_referrer_name", ""); // optional
// zohoForm.append("zf_redirect_url", ""); // optional
// zohoForm.append("zc_gad", ""); // optional
// zohoForm.append("Name_First", data.Name || "");
// zohoForm.append("Name_Last", "text"); // optional
// zohoForm.append("Email", data.Email || "");
// zohoForm.append("SingleLine", data.service || "");
// zohoForm.append("SingleLine1", data.Mobile || "");
// zohoForm.append("MultiLine", "text");
// zohoForm.append("SingleLine1", data.Mobile || "");
// await fetch(zohoFormUrl, {
// method: "POST",
// body: zohoForm,
// });
// console.log("✅ Submitted to Zoho Form");
// } catch (error) {
// console.error("❌ Zoho submission failed:", error);
// }
try {
const response = await axios.post("/api/homegooglesheet", leadData, {
......@@ -186,7 +216,9 @@ const CallBackRequest = () => {
})}
/>
{errors.Email && (
<span className="error">{errors.Email.message}</span>
<span className="error">
{errors.Email.message}
</span>
)}
</Form.Group>
</div>
......@@ -201,7 +233,10 @@ const CallBackRequest = () => {
type="text"
className="form-control"
onInput={(e) => {
e.target.value = e.target.value.replace(/[^0-9]/g, '');
e.target.value = e.target.value.replace(
/[^0-9]/g,
""
);
}}
{...register("Mobile", {
required: "Enter Your Mobile Number",
......@@ -212,7 +247,9 @@ const CallBackRequest = () => {
})}
/>
{errors.Mobile && (
<span className="error">{errors.Mobile.message}</span>
<span className="error">
{errors.Mobile.message}
</span>
)}
</Form.Group>
</div>
......@@ -232,7 +269,9 @@ const CallBackRequest = () => {
className="form-control"
/>
{errors.service && (
<span className="error">{errors.service.message}</span>
<span className="error">
{errors.service.message}
</span>
)}
</Form.Group>
</div>
......@@ -249,6 +288,8 @@ const CallBackRequest = () => {
</Row>
</form>
</div>
<></>
</Col>
</Row>
</Container>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!