Reply To: log the only final status of the radio button

PennController for IBEX Forums Support log the only final status of the radio button Reply To: log the only final status of the radio button

#6342
Jeremy
Keymaster

Hi Peiyao,

You’d probably be better off using a good old HTML checkbox input, which comes with the on/off switch behavior you’re looking to implement by default:

question = (name,text) => [
    newText("Question-"+name, text)
    ,
    newHtml("know-"+name, "<input type='checkbox' id='know-"+name+"' name='know-"+name+"'>"+
                          "<label for='know-"+name+"'>I know this name</label>")
        .log()
        .before(getText("Question-"+name) )
        .size("auto")
        .print()
    ,
    newCanvas("empty canvas", 1, 10)
         .print()
]

newTrial("names",
    ...Authornames.map((v,i) => question(i,v))
    ,
    newCanvas("empty canvas", 1, 30)
         .print()    
    , 
    newButton("done", "Done")
        .print()
        .settings.css("font-size", "24")
        .center()
        .wait()
)

Jeremy