Created
January 7, 2020 18:21
-
-
Save TechandEco/726048b438f22f2e7ce972d7c9cf81b6 to your computer and use it in GitHub Desktop.
GSuite-samples/twilio-sheet/webapp/Page.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<h1>Let's send you a text</h1> | |
<p>Please enter your phone number without any special characters or spaces.</p> | |
<label>Phone number: </label><input type="text" id="phoneInput" placeholder="ex: 9990001234"> | |
<button id="submitButton">Submit</button> | |
<script> | |
document.getElementById('submitButton').addEventListener('click', function() { | |
// Get the value from the `phoneInput` text box. | |
var phoneNumber = document.getElementById('phoneInput').value; | |
// Run the Apps Script `userClicked` function passing the `phoneNumber` input. | |
google.script.run.userClicked(phoneNumber); | |
// Clear the `phoneInput` text box. | |
document.getElementById('phoneInput').value = ''; | |
}); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment