- move script file below the contact form html
This commit is contained in:
parent
56db658d81
commit
5710d0d7e8
@ -1,10 +1,10 @@
|
||||
{
|
||||
"build": {
|
||||
"id": "e9c81588-e714-4267-926a-2c31ca888645",
|
||||
"id": "4dc1ad00-4fe1-4c96-8c5c-746c4e4293ef",
|
||||
"projectId": "363652e3-9846-4534-acdf-9b2b3c66eec0",
|
||||
"version": 1380,
|
||||
"createdAt": "2025-11-23T14:14:47.33+00:00",
|
||||
"updatedAt": "2025-11-23T14:14:47.33+00:00",
|
||||
"version": 1381,
|
||||
"createdAt": "2025-11-23T14:35:23.308+00:00",
|
||||
"updatedAt": "2025-11-23T14:35:23.308+00:00",
|
||||
"pages": {
|
||||
"meta": {
|
||||
"siteName": "Inasa Healthcare",
|
||||
@ -18836,36 +18836,6 @@
|
||||
"value": "top"
|
||||
}
|
||||
],
|
||||
[
|
||||
"cw60Z5OIddkmhYrAGLuXS",
|
||||
{
|
||||
"id": "cw60Z5OIddkmhYrAGLuXS",
|
||||
"instanceId": "uSjaW2mbY3uU8GvRWvgZk",
|
||||
"name": "executeScriptOnCanvas",
|
||||
"type": "boolean",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"invnFN8o-LKo5xUeNsOCu",
|
||||
{
|
||||
"id": "invnFN8o-LKo5xUeNsOCu",
|
||||
"instanceId": "uSjaW2mbY3uU8GvRWvgZk",
|
||||
"name": "code",
|
||||
"type": "string",
|
||||
"value": "<script>\n document.getElementById('contact.form').addEventListener('submit', function(event) {\n event.preventDefault(); // Prevent default form submission\n\n const webhookUrl = 'https://n8n-ai.bsidesolutions.net/webhook-test/9974ca96-98ba-4e56-bb48-debfdad8cf59'; // use Webhook studio Global data var\n \n const name = document.getElementById('contact.name').value;\n const subject = document.getElementById('contact.subject').value;\n const sender = document.getElementById('contact.email').value;\n const message = document.getElementById('contact.message').value;\n const recipient = 'no-reply@inasahealthcare.com'; // use Webhook studio Global data var\n\n const formData = {\n name,\n subject,\n sender,\n message,\n recipient\n };\n\n fetch(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json' // Or 'application/x-www-form-urlencoded' if your webhook expects that\n },\n body: JSON.stringify(formData) // Send data as JSON\n })\n .then(response => {\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n return response.json(); // Or response.text() if your webhook doesn't return JSON\n })\n .then(data => {\n document.getElementById('contact.responseMessage').innerText = 'Message sent successfully!';\n console.log('Success:', data);\n document.getElementById('contact.form').reset(); // Clear the form\n })\n .catch(error => {\n document.getElementById('contact.responseMessage').innerText = 'Error sending message.';\n console.error('Error:', error);\n });\n});\n</script>\n"
|
||||
}
|
||||
],
|
||||
[
|
||||
"c7ZFH-NdaT_K_CbWS7ZfX",
|
||||
{
|
||||
"id": "c7ZFH-NdaT_K_CbWS7ZfX",
|
||||
"instanceId": "uSjaW2mbY3uU8GvRWvgZk",
|
||||
"name": "data-ws-show",
|
||||
"type": "boolean",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"ccITyZzB79B6v3ZUQR0XR",
|
||||
{
|
||||
@ -19115,6 +19085,36 @@
|
||||
"type": "boolean",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"O8ZrMSAf-peBbAcxnEe_V",
|
||||
{
|
||||
"id": "O8ZrMSAf-peBbAcxnEe_V",
|
||||
"instanceId": "pYQCHxLaM41Bu_mV4UbC-",
|
||||
"name": "executeScriptOnCanvas",
|
||||
"type": "boolean",
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"Defpg4FroNqeViZFGwY1Z",
|
||||
{
|
||||
"id": "Defpg4FroNqeViZFGwY1Z",
|
||||
"instanceId": "pYQCHxLaM41Bu_mV4UbC-",
|
||||
"name": "code",
|
||||
"type": "string",
|
||||
"value": "<script>\n document.getElementById('contact.form').addEventListener('submit', function(event) {\n event.preventDefault(); // Prevent default form submission\n\n const webhookUrl = 'https://n8n-ai.bsidesolutions.net/webhook-test/9974ca96-98ba-4e56-bb48-debfdad8cf59'; // use Webhook studio Global data var\n \n const name = document.getElementById('contact.name').value;\n const subject = document.getElementById('contact.subject').value;\n const sender = document.getElementById('contact.email').value;\n const message = document.getElementById('contact.message').value;\n const recipient = 'no-reply@inasahealthcare.com'; // use Webhook studio Global data var\n\n const formData = {\n name,\n subject,\n sender,\n message,\n recipient\n };\n\n fetch(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json' // Or 'application/x-www-form-urlencoded' if your webhook expects that\n },\n body: JSON.stringify(formData) // Send data as JSON\n })\n .then(response => {\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n return response.json(); // Or response.text() if your webhook doesn't return JSON\n })\n .then(data => {\n document.getElementById('contact.responseMessage').innerText = 'Message sent successfully!';\n console.log('Success:', data);\n document.getElementById('contact.form').reset(); // Clear the form\n })\n .catch(error => {\n document.getElementById('contact.responseMessage').innerText = 'Error sending message.';\n console.error('Error:', error);\n });\n});\n</script>\n"
|
||||
}
|
||||
],
|
||||
[
|
||||
"Hb00IyqTqc5rUNcz7kiW2",
|
||||
{
|
||||
"id": "Hb00IyqTqc5rUNcz7kiW2",
|
||||
"instanceId": "pYQCHxLaM41Bu_mV4UbC-",
|
||||
"name": "data-ws-show",
|
||||
"type": "boolean",
|
||||
"value": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"dataSources": [],
|
||||
@ -22001,6 +22001,10 @@
|
||||
"type": "id",
|
||||
"value": "sir1L86ob3MdPhstm94Hb"
|
||||
},
|
||||
{
|
||||
"type": "id",
|
||||
"value": "pYQCHxLaM41Bu_mV4UbC-"
|
||||
},
|
||||
{
|
||||
"type": "id",
|
||||
"value": "EU6EtJAyQi0dpga8GbbPz"
|
||||
@ -22044,10 +22048,6 @@
|
||||
"type": "id",
|
||||
"value": "HLdPOW3dqt3mudoX4-MkP"
|
||||
},
|
||||
{
|
||||
"type": "id",
|
||||
"value": "uSjaW2mbY3uU8GvRWvgZk"
|
||||
},
|
||||
{
|
||||
"type": "id",
|
||||
"value": "lCpf84n4fhCxkyPGN9sTF"
|
||||
@ -22074,15 +22074,6 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
"uSjaW2mbY3uU8GvRWvgZk",
|
||||
{
|
||||
"type": "instance",
|
||||
"id": "uSjaW2mbY3uU8GvRWvgZk",
|
||||
"component": "HtmlEmbed",
|
||||
"children": []
|
||||
}
|
||||
],
|
||||
[
|
||||
"lCpf84n4fhCxkyPGN9sTF",
|
||||
{
|
||||
@ -22366,6 +22357,15 @@
|
||||
"tag": "input",
|
||||
"children": []
|
||||
}
|
||||
],
|
||||
[
|
||||
"pYQCHxLaM41Bu_mV4UbC-",
|
||||
{
|
||||
"type": "instance",
|
||||
"id": "pYQCHxLaM41Bu_mV4UbC-",
|
||||
"component": "HtmlEmbed",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
],
|
||||
"deployment": {
|
||||
|
||||
2
app/__generated__/$.tsx
generated
2
app/__generated__/$.tsx
generated
@ -10,7 +10,7 @@ import { HtmlEmbed as HtmlEmbed, Fragment as Fragment_1, Image as Image, Slot as
|
||||
|
||||
export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0";
|
||||
|
||||
export const lastPublished = "2025-11-23T14:14:47.330Z";
|
||||
export const lastPublished = "2025-11-23T14:35:23.308Z";
|
||||
|
||||
export const siteName = "Inasa Healthcare";
|
||||
|
||||
|
||||
10
app/__generated__/[contact]._index.tsx
generated
10
app/__generated__/[contact]._index.tsx
generated
@ -10,7 +10,7 @@ import { Link as Link, Body as Body, RemixForm as RemixForm } from "@webstudio-i
|
||||
|
||||
export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0";
|
||||
|
||||
export const lastPublished = "2025-11-23T14:14:47.330Z";
|
||||
export const lastPublished = "2025-11-23T14:35:23.308Z";
|
||||
|
||||
export const siteName = "Inasa Healthcare";
|
||||
|
||||
@ -149,10 +149,6 @@ className={`w-element`}>
|
||||
className={`w-element`}>
|
||||
{"Contact Us"}
|
||||
</h1>
|
||||
<HtmlEmbed
|
||||
executeScriptOnCanvas={true}
|
||||
code={"<script>\n document.getElementById('contact.form').addEventListener('submit', function(event) {\n event.preventDefault(); // Prevent default form submission\n\n const webhookUrl = 'https://n8n-ai.bsidesolutions.net/webhook-test/9974ca96-98ba-4e56-bb48-debfdad8cf59'; // use Webhook studio Global data var\n \n const name = document.getElementById('contact.name').value;\n const subject = document.getElementById('contact.subject').value;\n const sender = document.getElementById('contact.email').value;\n const message = document.getElementById('contact.message').value;\n const recipient = 'no-reply@inasahealthcare.com'; // use Webhook studio Global data var\n\n const formData = {\n name,\n subject,\n sender,\n message,\n recipient\n };\n\n fetch(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json' // Or 'application/x-www-form-urlencoded' if your webhook expects that\n },\n body: JSON.stringify(formData) // Send data as JSON\n })\n .then(response => {\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n return response.json(); // Or response.text() if your webhook doesn't return JSON\n })\n .then(data => {\n document.getElementById('contact.responseMessage').innerText = 'Message sent successfully!';\n console.log('Success:', data);\n document.getElementById('contact.form').reset(); // Clear the form\n })\n .catch(error => {\n document.getElementById('contact.responseMessage').innerText = 'Error sending message.';\n console.error('Error:', error);\n });\n});\n</script>\n"}
|
||||
className={`w-html-embed`} />
|
||||
<RemixForm
|
||||
id={"contact.form"}
|
||||
method={"post"}
|
||||
@ -228,6 +224,10 @@ className={`w-element`}>
|
||||
id={"contact.responseMessage"}
|
||||
className={`w-element`} />
|
||||
</div>
|
||||
<HtmlEmbed
|
||||
executeScriptOnCanvas={true}
|
||||
code={"<script>\n document.getElementById('contact.form').addEventListener('submit', function(event) {\n event.preventDefault(); // Prevent default form submission\n\n const webhookUrl = 'https://n8n-ai.bsidesolutions.net/webhook-test/9974ca96-98ba-4e56-bb48-debfdad8cf59'; // use Webhook studio Global data var\n \n const name = document.getElementById('contact.name').value;\n const subject = document.getElementById('contact.subject').value;\n const sender = document.getElementById('contact.email').value;\n const message = document.getElementById('contact.message').value;\n const recipient = 'no-reply@inasahealthcare.com'; // use Webhook studio Global data var\n\n const formData = {\n name,\n subject,\n sender,\n message,\n recipient\n };\n\n fetch(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json' // Or 'application/x-www-form-urlencoded' if your webhook expects that\n },\n body: JSON.stringify(formData) // Send data as JSON\n })\n .then(response => {\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n return response.json(); // Or response.text() if your webhook doesn't return JSON\n })\n .then(data => {\n document.getElementById('contact.responseMessage').innerText = 'Message sent successfully!';\n console.log('Success:', data);\n document.getElementById('contact.form').reset(); // Clear the form\n })\n .catch(error => {\n document.getElementById('contact.responseMessage').innerText = 'Error sending message.';\n console.error('Error:', error);\n });\n});\n</script>\n"}
|
||||
className={`w-html-embed`} />
|
||||
<div
|
||||
className={`w-element`} />
|
||||
</section>
|
||||
|
||||
2
app/__generated__/[services]._index.tsx
generated
2
app/__generated__/[services]._index.tsx
generated
@ -11,7 +11,7 @@ import { Dialog as Dialog, DialogTrigger as DialogTrigger, DialogOverlay as Dial
|
||||
|
||||
export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0";
|
||||
|
||||
export const lastPublished = "2025-11-23T14:14:47.330Z";
|
||||
export const lastPublished = "2025-11-23T14:35:23.308Z";
|
||||
|
||||
export const siteName = "Inasa Healthcare";
|
||||
|
||||
|
||||
2
app/__generated__/_index.tsx
generated
2
app/__generated__/_index.tsx
generated
@ -11,7 +11,7 @@ import { Dialog as Dialog, DialogTrigger as DialogTrigger, DialogOverlay as Dial
|
||||
|
||||
export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0";
|
||||
|
||||
export const lastPublished = "2025-11-23T14:14:47.330Z";
|
||||
export const lastPublished = "2025-11-23T14:35:23.308Z";
|
||||
|
||||
export const siteName = "Inasa Healthcare";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user