Skip to content

Instantly share code, notes, and snippets.

@TechandEco
Created January 7, 2020 18:21
Show Gist options
  • Save TechandEco/726048b438f22f2e7ce972d7c9cf81b6 to your computer and use it in GitHub Desktop.
Save TechandEco/726048b438f22f2e7ce972d7c9cf81b6 to your computer and use it in GitHub Desktop.
GSuite-samples/twilio-sheet/webapp/Page.html
<!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