Commit 4253a47a by sujata

zoho form data integration -check

1 parent f174945f
...@@ -62,6 +62,36 @@ const CallBackRequest = () => { ...@@ -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 { try {
const response = await axios.post("/api/homegooglesheet", leadData, { const response = await axios.post("/api/homegooglesheet", leadData, {
...@@ -186,7 +216,9 @@ const CallBackRequest = () => { ...@@ -186,7 +216,9 @@ const CallBackRequest = () => {
})} })}
/> />
{errors.Email && ( {errors.Email && (
<span className="error">{errors.Email.message}</span> <span className="error">
{errors.Email.message}
</span>
)} )}
</Form.Group> </Form.Group>
</div> </div>
...@@ -201,7 +233,10 @@ const CallBackRequest = () => { ...@@ -201,7 +233,10 @@ const CallBackRequest = () => {
type="text" type="text"
className="form-control" className="form-control"
onInput={(e) => { onInput={(e) => {
e.target.value = e.target.value.replace(/[^0-9]/g, ''); e.target.value = e.target.value.replace(
/[^0-9]/g,
""
);
}} }}
{...register("Mobile", { {...register("Mobile", {
required: "Enter Your Mobile Number", required: "Enter Your Mobile Number",
...@@ -212,7 +247,9 @@ const CallBackRequest = () => { ...@@ -212,7 +247,9 @@ const CallBackRequest = () => {
})} })}
/> />
{errors.Mobile && ( {errors.Mobile && (
<span className="error">{errors.Mobile.message}</span> <span className="error">
{errors.Mobile.message}
</span>
)} )}
</Form.Group> </Form.Group>
</div> </div>
...@@ -232,7 +269,9 @@ const CallBackRequest = () => { ...@@ -232,7 +269,9 @@ const CallBackRequest = () => {
className="form-control" className="form-control"
/> />
{errors.service && ( {errors.service && (
<span className="error">{errors.service.message}</span> <span className="error">
{errors.service.message}
</span>
)} )}
</Form.Group> </Form.Group>
</div> </div>
...@@ -249,6 +288,8 @@ const CallBackRequest = () => { ...@@ -249,6 +288,8 @@ const CallBackRequest = () => {
</Row> </Row>
</form> </form>
</div> </div>
<></>
</Col> </Col>
</Row> </Row>
</Container> </Container>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!