diff --git a/content/forms/add.md b/content/forms/add.md index 5cca259..f4f8632 100644 --- a/content/forms/add.md +++ b/content/forms/add.md @@ -24,7 +24,11 @@ Forms can be added to websites with just the HTML code for it. For instance: ```html -
+

Interested in receiving latest news about our cool product? Sign up for you fantastic newsletter! @@ -60,7 +64,8 @@ JavaScript code: const form = document.getElementById("newsletter-form"); async function handleSubmit() { - const url = window.location; + const url = + "https:///api/v1/forms/submit?host=&path="; const data = { email: document.getElementById("email"), }; @@ -77,4 +82,5 @@ JavaScript code: form.addEventListener("submit", handleSubmit); ``` + > Note: the following snippet also demonstrates JSON form submission