update
This commit is contained in:
@@ -105,6 +105,8 @@
|
||||
<textarea id="content" name="content" rows="8" placeholder="Please describe your question in detail">
|
||||
</textarea>
|
||||
</div>
|
||||
<!-- Hidden field: Current page URL -->
|
||||
<input type="hidden" id="pageUrl" name="pageUrl" />
|
||||
<div style="text-align: right;">
|
||||
<input class="button" type="submit" value="Send" id="submitBtn" />
|
||||
</div>
|
||||
@@ -122,6 +124,10 @@ const companyInput = document.getElementById("company");
|
||||
const emailInput = document.getElementById("email");
|
||||
const topicSelect = document.getElementById("topic");
|
||||
const contentTextarea = document.getElementById("content");
|
||||
const pageUrlInput = document.getElementById("pageUrl");
|
||||
|
||||
// Set current page URL to hidden field
|
||||
pageUrlInput.value = window.location.href;
|
||||
|
||||
// Get message modal elements
|
||||
const messageModal = document.getElementById("messageModal");
|
||||
@@ -222,7 +228,8 @@ customerForm.onsubmit = function(event) {
|
||||
company: companyInput.value.trim(),
|
||||
email: emailInput.value.trim(),
|
||||
topic: topicSelect.value,
|
||||
content: contentTextarea.value.trim()
|
||||
content: contentTextarea.value.trim(),
|
||||
pageUrl: pageUrlInput.value
|
||||
};
|
||||
|
||||
// Send AJAX request
|
||||
|
||||
Reference in New Issue
Block a user