Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
sujata
/
advithconsulting.io-frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 4253a47a
authored
2025-10-15 18:52:11 +0530
by
sujata
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
zoho form data integration -check
1 parent
f174945f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
4 deletions
components/reuseables/CallBackRequest.js
components/reuseables/CallBackRequest.js
View file @
4253a47
...
...
@@ -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
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment