Poll
Here you'll find sample code and an example of our Poll widget. You can setup as many polls as you like from Your Account \ Polls.
This widget is also available as a WordPress plugin: StatsFC Poll.
Full Code Example
<html>
<head>
<title>Your Website Title</title>
</head>
<body>
<!-- Load jQuery -->
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<!-- Load Stats FC Poll SDK -->
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://cdn.statsfc.com/js/poll.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'statsfc-poll-js'));
</script>
<!-- Your poll here -->
<div class="statsfc-poll"
data-key="YOUR STATSFC KEY"
data-question-id="2"
data-use-default-css="true">
</div>
</body>
</html>
Settings
| Setting | HTML5 Attribute | Description | Default |
|---|---|---|---|
key |
data-key |
Required. Your Stats FC account key. | None |
questionId |
data-question-id |
Required. The ID of the poll you want to display. E.g., 100, 101
|
None |
omitErrors |
data-omit-errors |
Optional. Whether or not you want to omit error messages. Can be one of: true, false
|
false |
useDefaultCss |
data-use-default-css |
Optional. Whether or not you want to use the widget's default styles. Can be one of: true, false
|
false |
lang |
data-lang |
Optional. The ISO 639-1 two-letter language code. |
en |
Code Generator
| Field | Value |
|---|---|
Credits
- Croatian translations: Johan Jovo.
- Danish translations: fcbarcelona.dk and Morten Rugaard.
- Estonian translations: liiga.io.
- Finnish translations: Sami Johansson (Winbets.com).
- French translations: Mila&Noa Guerrini (Topic Foot).
- German translations: welle1953.net.
- Hungarian translations: sportfogadasonline.com.
- Indonesian translations: gilabola.com.
- Italian translations: Niccolò Misul.
- Norwegian Bokmål translations: Remy Kongsvoll.
- Portuguese translations: Tiago Mateus.
- Slovak translations: Marek Kazda at football365.sk.
- Slovenian translations: Johan Jovo.
- Spanish translations: ganabet.mx, deportips.mx and fcbarcelona.dk.
- Swedish translations: Sportsson.com.
- Turkish translations: bordomazi.com.
If you'd like to help us with any translations please get in touch at hello@statsfc.com.