scale.settings.once

getScale(id).settings.once() Disables the scale after the first selection has happened. [js highlight=”4″ try=”true”]newScale(“hunger”, 5) .settings.before( newText(“left”, “Right now, I am… very hungry “) ) .settings.after( newText(“right”, ” not hungry at all”) ) .settings.once() .print() .wait() [/js] Adds a 5-point radio scale and waits for a click on one of its buttons, after which selection cannot …

scale.settings.log

getScale(id).settings.log() or getScale(id).settings.log(“last”) (since beta 0.4) or getScale(id).settings.log(“first”) (since beta 0.4) or getScale(id).settings.log(“all”) Adds a line to the result file indicating which button is selected at what time(stamp). Leaving the parentheses blank is equivalent to passing only “last”: only the very last option to be selected will be saved. If “first”, then the very first …

scale.settings.labelsPosition

(Since version 1.0, formerly labels) getScale(id).settings.labelsPosition(“bottom”) or getScale(id).settings.labelsPosition(“left”) (since version 1.0) or getScale(id).settings.labelsPosition(“top”) or getScale(id).settings.labelsPosition(“right”) (since version 1.0) Sets the position of the labels of the scale to bottom, left, top or right. If you did not specify labels, the buttons’ indices will be used instead. [js highlight=”3″ try=”true”] newScale(“score”, “Bad”, “So-so”, “Good”) .settings.radio() .settings.labelsPosition(“right”) …

scale.settings.horizontal

getScale(id).settings.horizontal() (since beta 0.3) Makes the buttons and labels of the scale appear horizontally. This is the default aesthetics of scales. Note: until version 1.0, you need to call print (again) for the settings to take effect. Example: [js highlight=”10″ try=”true”] newScale(“slider”, 100) .settings.slider() .settings.vertical() .print() , newButton(“rotate”, “Horizontal slider”) .print() .wait() , getScale(“slider”) .settings.horizontal() …

scale.settings.default

getScale(id).settings.default( value ) (since beta 0.3) Makes a value selected by default when printing the scale element. You can pass either an index or a text value as value. Note that sliders necessarily have a default value. If you do not use .default to specify one, the central one will be used (or next to …

scale.settings.callback

getScale(id).settings.callback( sequenceOfCommands ) (since beta 0.4) Executes a sequence of commands whenever a choice is made on the scale. This is particularly useful if, for example, you want to reveal a only when a certain option is chosen. Example: [js highlight=”7-12″ try=”true”] newTextInput( “other” , “” ) .settings.hidden() , newScale(“yarrel”, “Yanny”, “Laurel”, “other”) .settings.labelsPosition( “right” …

scale.settings.button

getScale(id).settings.button() Makes the buttons of the scale appear as clickable text buttons that are framed when selected. If you passed a number when creating the scale, the buttons will be labeled with numbers (starting from 0). Example: [js highlight=”2″ try=”true”]newScale(“score”, 6) .settings.button() .settings.before( newText(“score label”, “Score: “) ) .settings.after( newText(“score text”, ” / 5″) ) …

key.settings.log

getKey(id).settings.log() or getKey(id).settings.log(“wait”) (since beta 0.4) or getKey(id).settings.log(“first”) (since beta 0.4) or getKey(id).settings.log(“last”) (since beta 0.4) or getKey(id).settings.log(“all”) A line will be added to the results file indicating which key was pressed when. If you leave the parentheses blank or pass “wait” (those are equivalent) then key presses will only be logged if they validate …

html.settings.log

getHtml(id).settings.log() (since beta 0.2) Will add a line at the end of the trial for each <textarea>, <input type=’text’>, <input type=’checkbox’> and <input type=’radio’> in the document. Example: [js highlight=”2″]newHtml(“feedback”, “Feedback.html”) .settings.log() .print() , newButton(“send”, “Send”) .print() .wait()[/js] Adds the content of the file Feedback.html from the Resources (chunk_includes) folder of the Ibex project to …