Last active
April 24, 2018 15:32
-
-
Save kdipaolo/5a5ffd44349198aac5d154fc894d1835 to your computer and use it in GitHub Desktop.
Intercom Form
This file contains 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> | |
<head> | |
<meta charset="utf-8"> | |
<script> | |
document.addEventListener("DOMContentLoaded", function (event) { | |
var form = document.querySelector('#intercom_form') | |
form.addEventListener('submit', e => { | |
e.preventDefault() | |
var email = document.querySelector('#email').value | |
var name = document.querySelector('#name').value | |
var phone = document.querySelector('#phone').value | |
// Will need to merge in latest PR in order for a new user to be created in intercom at app.bidlikeaboss.com | |
window.location.href = `https://app.bidlikeaboss.com/?i_name=${name}&i_email=${email}&i_phone=${phone}` | |
}) | |
}); | |
</script> | |
</head> | |
<body> | |
<form id="intercom_form"> | |
Name: | |
<br> | |
<input type="text" name="name" id="name" placeholder=""> | |
<br> Email: | |
<br> | |
<input type="email" name="email" id="email" placeholder=""> | |
<br> Phone: | |
<br> | |
<input type="phone" name="phone" id="phone" placeholder=""> | |
<br> | |
<button type="submit">Add User</button> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kdipaolo Can you incorporate this from Instapage?