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
{ | |
"data": { | |
"id": "0de0f531f7fb475487d5a71ce4174153", | |
"type": "project", | |
"project": { | |
"ref": "0de0f531f7fb475487d5a71ce4174153", | |
"name": "Address Example", | |
"slug": "address-example", | |
"forms": [ | |
{ |
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
library(httr) | |
library(jsonlite) # if needing json format | |
cID<-"999" # client ID | |
secret<- "F00HaHa00G" # client secret | |
proj.slug<- "YourProjectSlug" # project slug | |
form.ref<- "YourFormRef" # form reference | |
branch.ref<- "YourFromRef+BranchExtension" # branch reference | |
res <- POST("https://five.epicollect.net/api/oauth/token", |
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
Epicollect5 is a free and easy-to-use mobile data-gathering platform developed by the CGPS Team of Oxford BDI and publicly available at https://five.epicollect.net | |
It provides both web and mobile applications for the generation of forms (questionnaires) and freely hosted project websites for data collection. | |
Data are collected (including GPS and media) using multiple devices and all data can be viewed on a central server (via map, tables, and charts). | |
Data can be exported in CSV and JSON format | |
The User Guide can be found at https://docs.epicollect.net |
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
var askConfirm = function (the_title, the_message, onConfirmCallback, has_data_to_save, the_current_input, is_branch) { | |
var current_input = the_current_input; | |
var response; | |
if (navigator.notification && !EC.Utils.isChrome()) { | |
var _confirmCallback = function (btn_index) { | |
console.log('btn_index: ' + btn_index); |
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
//add bottom border to last element only | |
if (index === group_input_labels.length - 1) { | |
HTML += '<div class="ui-block-a group-inputs-grid__label group-inputs-grid-bottom-border">'; | |
HTML += '<div class="ui-bar ui-bar-e" style="height:60px">' + single_label.label + '</div>'; | |
HTML += '</div>'; | |
} else { | |
HTML += '<div class="ui-block-a group-inputs-grid__label">'; | |
HTML += '<div class="ui-bar ui-bar-e" style="height:60px">' + single_label.label + '</div>'; | |
HTML += '</div>'; | |
} |
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
//populate lists with autocomplete suggestions based on project names on the server | |
dom_list.on('listviewbeforefilter', function (e, data) { | |
console.log('typing'); | |
var $ul = $(this); | |
var $input = $(data.input); | |
var value = $input.val(); | |
var 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
{ | |
"requireCurlyBraces": [ | |
"if", | |
"else", | |
"for", | |
"while", | |
"do", | |
"try", | |
"catch" | |
], |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* | |
* http://plus.epicollect.net/post_image_test | |
* post request for single file (image) | |
*/ | |
Array | |
( | |
[name] => Array | |
( | |
[name] => test_form_ecplus_test_form_ctrl2_a2439aad10124340_1425745268593.jpg |
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
/* | |
* http://plus.epicollect.net/post_image_test | |
* post request for single entry (data) | |
*/ | |
Array | |
( | |
[table] => test_form | |
[ecTimeCreated] => 1425745270 | |
[ecPhoneID] => a2439aad10124340 |
NewerOlder