buttonsAdvanced
buttonsAdvanced
xxxxxxxxxx
define(['questAPI'], function(Quest){
var API = new Quest();
// ### Setup
// Set the baseURL for use within images
API.addCurrent({baseURL:'../../images/'});
// ### Questions
// Use variables from the data property to create the name and stem.
// The idea is that this question will be inherited by many other questions.
// Those questions will set the name and stem by setting variables into the data property (see example below).
API.addQuestionsSet('basicSelect',
{
type: 'selectOne',
autoSubmit:true,
numericValues:true,
required:true,
style:'multiButtons',
name:'<%=questionsData.trait%>.<%=questionsData.firstName%>.<%=questionsData.lastName%>',
stem : 'How <%=questionsData.trait%> or <%=questionsData.untrait%> do you think that <%=questionsData.firstName%> <%=questionsData.lastName%> is?',
errorMsg: {
required: "Please select an answer, or click 'decline to answer'"
},
answers : [
'1 - Extremely <%=questionsData.untrait%>',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9 - Extremely <%=questionsData.trait%>'
],
help: '<%= pagesMeta.number < 3 %>',
helpText: 'Selecting an answer once colors it blue.<br/>You can change your answer by selecting another option.<br/>To confirm, click the selected (blue) button a second time.'
});
// Create questions that inherit basicSelect and set the name of the target person.
API.addQuestionsSet('people',
[
{
inherit : 'basicSelect',
Last modified March 11, 2021: setup hugo (11980dc)