document.addEventListener("DOMContentLoaded", function() {
// Select the button based on its text content
const nextStepButton = Array.from(document.querySelectorAll('a')).find(el => el.textContent.trim() === 'NEXT STEP');
if (nextStepButton) {
nextStepButton.addEventListener('click', function(event) {
// Prevent the default action if it's part of a form
event.preventDefault();
// Select the input field by its attributes
const inputField = document.querySelector('input[type="tel"][name="DRWK90cbW"]');
if (inputField) {
const inputValue = inputField.value;
console.log(inputValue); // Log the value or send it to Airtable
// Example: Call a function to send this data to Airtable (implement accordingly)
sendDataToAirtable(inputValue);
} else {
console.error('Input field not found');
}
});
} else {
console.error('Next Step button not found');
}
});
// Example function to send data to Airtable (implement your actual data handling here)
function sendDataToAirtable(data) {
// Implement AJAX call or fetch API to send data securely
console.log('Sending to Airtable:', data);
}