{ "survey" : { "layout" : "card", //selects survey layout "sections" : [ { //indicates multiple pages are desired "title" : "Participant Visit", //this title and the next 3 lines defines a given page and label "header" : true, "collapsible" : true, "defaultLabelWidth" : 175, "questions" : [ //Populates page with questions { "required": true, //does this need to be filled out to proceed "jsonType": "string", //indicates the form of the answer "width": 350, //dictates how large the answer space is "inputType": "text", //determines how the user enters information "name": "participantid", //'name' is how this data could be referred to in the code e.g. when 'participantid' starts with 0112, ask this question too. "caption" : "Participant ID:", //This is what the user actually sees }, { "name" : "Birthdate", "caption" : "When is your birthday?", "jsonType" : "date", //automatically supplies calendar dropdown "inputType" : "text", //can also be added manually "width" : 350 }, { "extConfig": { //says that the questions from here on out use radio buttons "xtype": "radiogroup", "margin": "0px 0px 10px 10px", "width" : 250, "fieldLabel": "Gender?", "name": "Gender", "columns": 2, //dictates the number of response options "items": [ //defines each answer { "boxLabel": "Male", "name": "Gender", "inputValue": false }, { "boxLabel": "Female", "name": "Gender", "inputValue": True } ] } }, { "extConfig": { //says that the questions from here on out are normal fill-in-the-blank "xtype": "displayfield", "fieldLabel": " " } }, { "name" : "Hungry", //Creates a checkbox question "caption" : "Check the box if you are hungry.", "hidden" : false, "jsonType" : "boolean", "inputType" : "text", "required" : true, "width" : 500 } ] }, { "title" : "Page 2: fast food", //Creates a second page (Where you order your lunch) "header" : true, "collapsible" : true, "defaultLabelWidth" : 265, "questions" : [ { "extConfig": { "xtype": "displayfield", "value": "Supersize it?: ___, Fries with that?: ___" //creates fields for manual entry } }, { "extConfig": { "xtype": "displayfield", //creates a field label "labelWidth": 800, "fieldLabel": "1. Dollar Menu:" } }, { "required": true, "extConfig": { "xtype": "radiogroup", //makes a series of radio buttons which can be reference logically to add questions "fieldLabel": "Can I take your order?", "name": "PlaceYourOrderRadio", "columns": 5, //# of buttons "items": [ { "boxLabel": "2 Apple pies", "name": "glomerulitis_g", "inputValue": 0, "width": 100 }, //label your buttons and define lookup fields { "boxLabel": "Junior Cheeseburger", "name": "glomerulitis_g", "inputValue": 1, "width": 100 }, { "boxLabel": "Large Fries", "name": "glomerulitis_g", "inputValue": 2, "width": 100 }, { "boxLabel": "Cholesterol on a stick", "name": "glomerulitis_g", "inputValue": 3, "width": 100 }, { "boxLabel": "Angioplasty", "name": "glomerulitis_g", "inputValue": -1, "width": 100 } ] } }, { "extConfig": { "xtype": "textarea", //creates a comments text box for extra information "name": "otherfindings", "width": 800, "height": 100, "fieldLabel": "15. Other Findings:" } }, { "extConfig": { //creates a series of checkboxes "xtype": "fieldcontainer", "margin": "0px 0px 10px 10px", "hideFieldLabel": true, "name": "fieldcontainer", "layout": "hbox", "width": 300, "items": [ { "xtype": "checkbox", "name": "extra ketchup?", "boxLabel": "Extra Ketchup", "width": 125 }, { "xtype": "checkbox", "name": "extra napkins", "boxLabel": "extra napkins", "width": 125 } ] } } ] } ] } }