This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit of very basic demo page
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Contact Data Services - sample code</title> | ||
</head> | ||
<body> | ||
<form> | ||
<label for="country">Country</label> | ||
<select name="country"> | ||
<option value="gbr">UK</option> | ||
<option value="usa">USA</option> | ||
</select> | ||
|
||
<label for="input">Address</label> | ||
<input type="text" name="address-input"> | ||
</form> | ||
<div id="picklist"></div> | ||
<div id="formatted-address"></div> | ||
|
||
<script src="src/js/contact-data-services.js"></script> | ||
<script> | ||
var options = { | ||
token: "4f0214b7-b7ec-4096-a19e-502b8046278c", | ||
address: { | ||
elements: { | ||
input: document.querySelector("input[name='address-input']"), | ||
country: document.querySelector("select"), | ||
picklist: document.querySelector("#picklist"), | ||
formattedAddress: document.querySelector("#formatted-address") | ||
} | ||
} | ||
}; | ||
contactDataServices.init(options); | ||
</script> | ||
</body> | ||
</html> |