-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(TYP-2386): Pass hidden fields via fragment
Pass hidden fields to typeform using both query params (legacy) and fragment (new approach)
- Loading branch information
Matej Lednicky
committed
Jun 30, 2020
1 parent
4901ac5
commit dfb926c
Showing
12 changed files
with
127 additions
and
68 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
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
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
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
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,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Widget example</title> | ||
<meta charset="utf-8" /> | ||
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' /> | ||
<link rel="stylesheet" href="demo.css" /> | ||
</head> | ||
<body> | ||
<div | ||
class="typeform-widget" | ||
data-url="./form/mock.html?foobar=hello" | ||
style="width:100%; height:500px;" | ||
></div> | ||
|
||
<script type="text/javascript" src="demo.js"></script> | ||
<script type="text/javascript" src="embed.js"></script> | ||
</body> | ||
</html> |
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,55 +1,63 @@ | ||
export const urls = [{ | ||
url: 'https://admin.typeform.com/to/bXK16J', | ||
params: { 'hola': 'mandarina' }, | ||
expected: 'https://admin.typeform.com/to/bXK16J?hola=mandarina', | ||
expected: 'https://admin.typeform.com/to/bXK16J?hola=mandarina' | ||
}, { | ||
url: 'https://url.com?hola=true', | ||
params: { 'mandarina': 'apple' }, | ||
expected: 'https://url.com?hola=true&mandarina=apple', | ||
expected: 'https://url.com?hola=true&mandarina=apple' | ||
}, { | ||
url: 'https://url.com/', | ||
params: { 'mandarina': 'apple' }, | ||
expected: 'https://url.com?mandarina=apple', | ||
expected: 'https://url.com?mandarina=apple' | ||
}, { | ||
url: 'https://url.com?mandarina=true', | ||
params: { 'mandarina': 'apple' }, | ||
expected: 'https://url.com?mandarina=apple', | ||
expected: 'https://url.com?mandarina=apple' | ||
}, { | ||
url: 'https://url.com?mandarina=true#naranja=yum', | ||
params: { 'mandarina': 'apple' }, | ||
expected: 'https://url.com?mandarina=apple#naranja=yum' | ||
}, { | ||
url: 'https://url.com#naranja=yum', | ||
params: { 'mandarina': 'apple' }, | ||
expected: 'https://url.com?mandarina=apple#naranja=yum' | ||
}] | ||
|
||
export const userAgents = [{ | ||
name: 'Safari iOS 10 (iPhone)', | ||
ua: 'Mozilla/5.0 (iPod touch; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1', | ||
isMobile: true, | ||
isSafari: true, | ||
isIOSDevice: true, | ||
isIOSDevice: true | ||
}, { | ||
name: 'Chrome mobile (Nexus)', | ||
ua: 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19', | ||
isMobile: true, | ||
isSafari: false, | ||
isIOSDevice: false, | ||
isIOSDevice: false | ||
}, { | ||
name: 'Safari iOS 9 (iPad)', | ||
ua: 'Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B137 Safari/601.1', | ||
isMobile: true, | ||
isSafari: true, | ||
isIOSDevice: true, | ||
isIOSDevice: true | ||
}, { | ||
name: 'Chrome iOS 9 (iPhone)', | ||
ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/56.0.2924.87 Mobile/13B143 Safari/601.1.46', | ||
isMobile: true, | ||
isSafari: true, // ? | ||
isIOSDevice: true, | ||
isIOSDevice: true | ||
}, { | ||
name: 'Edge Windows', | ||
ua: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240', | ||
isMobile: false, | ||
isSafari: false, | ||
isIOSDevice: false, | ||
isIOSDevice: false | ||
}, { | ||
name: 'Safari Mac OS', | ||
ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A', | ||
isMobile: false, | ||
isSafari: true, | ||
isIOSDevice: false, | ||
isIOSDevice: false | ||
}] |