Reply To: Unable to randomize fillers and experimental items

PennController for IBEX Forums Support Unable to randomize fillers and experimental items Reply To: Unable to randomize fillers and experimental items

#8219
yasufmg
Participant

Hi, Jeremy!

This is exactly what I’m looking for! Thank you so much!

One more thing: is there a way to align the numbers and the scale?

This is my code:

Template("experiment.csv", row =>
    newTrial( "experiment-"+row.TYPE,
        newText("sentence", row.SENTENCE)
            .cssContainer({"margin-top":"2em", "margin-bottom":"2em"})
            .center()
            .print()
            ,
            
    // 7-point scale

    newScale("slider", 100)
        .before( newText("left", "<div class='fancy'> TOTALMENTE INACEITÁVEL (0) </div>") )
        .after( newText("right", "<div class='fancy'> (100) TOTALMENTE ACEITÁVEL </div>") )
        .labelsPosition("top")
        .cssContainer({"margin":"1em"})
        .slider()
        .center()
        .size(400).css("max-width", "unset")
        .log()
        .print()
        ,
    
    newText(`
<span style='width: 2em; text-align: left;'>0</span>
        <span style='width: 2em; text-align: center;'>25</span>
        <span style='width: 2em; text-align: center;'>50</span>
        <span style='width: 2em; text-align: center;'>75</span>
        <span style='width: 2em; text-align: right;'>100</span>`)
    .css({display: 'flex', 'justify-content': 'space-between', width: '20em'})
    .print()
        ,

    newButton("go_to_exercise", "Próximo")
        .cssContainer({"margin":"1em"})
        .center()
        .print()
        .wait()
        ,

        // Wait briefly to display which option was selected
        newTimer("wait", 300)
            .start()
            .wait()
    )

And This is the demonstration link to my experiment.

Thanks for your help!

  • This reply was modified 1 year, 10 months ago by yasufmg.
  • This reply was modified 1 year, 10 months ago by yasufmg.
  • This reply was modified 1 year, 10 months ago by yasufmg.
  • This reply was modified 1 year, 10 months ago by yasufmg.