TextInput not allowing 1-5 digits after Acceptability Judgement scale

PennController for IBEX Forums Support TextInput not allowing 1-5 digits after Acceptability Judgement scale

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10438
    dod
    Participant

    Hi,

    I’m having some troubles with the newTextInput element. I have a simple newTextInput element right after an Acceptability Judgement scale, and I guess for this reason, I cannot input digits from 1 to 5. Is there any way to get around with that? Here’s the piece of code.

    Thank you in advance!

    newController("AcceptabilityJudgment", {
                    s: "",
                    as: ["1", "2", "3", "4", "5"],
                    presentAsScale: true,
                    leftComment: "pas naturelle",
                    rightComment: "très naturelle"
                    })
                .print()
                .center()
                .log()
                .wait()
                .remove()
        ,
            (   row.ask=="Q" ?
                [  
                newController("Question", {
                        q: row.question,
                        as: ["Oui", "Non"],
                        hasCorrect: row.answer,
                        randomOrder: false,
                        presentHorizontally: true
                        })
                    .print()
                    .center()
                    .log()
                    .wait()
                    .remove()
                ] // question trials
                :
                [
                    (row.ask=="N" ?
                    [newText("Quelles étaient les chiffres ? "+"<br><i>Appuyez sur la touche Entrée pour confirmer</i><br><br><br>"),
                    newTextInput("numbercheck")
                        .log()
                        .size(700,30)
                        .print()
                        .wait()
                        ] // number trials
                    :
                    []
                    )
                ]
            )
    #10443
    Jeremy
    Keymaster

    Hi,

    This is indeed a bug. One solution is to code the logic of the AcceptabilityJudgment controller using PennController commands instead:

    newText("sentence").center().print()
    ,
    newScale("AcceptabilityJudgment", 5)
        .before(newText("pas naturelle")).after(newText("très naturelle"))
        .button().center().log().print().keys().wait().remove()
    ,
    newTimer(100).start().wait()

    To make the visual rendering closer to the original controller, you can add these rules to global_main.css in your project’s Aesthetics folder:

    .PennController-AcceptabilityJudgment .option {
      width: 1em;
      height: 1em;
      text-align: center;
      color: blue;
      margin: 0.33em;
      padding: 0.33em;
      border: solid 1px black;
    }
    .PennController-AcceptabilityJudgment .option label {
      width: 100%;
    }
    .PennController-AcceptabilityJudgment-container .PennController-before, .PennController-AcceptabilityJudgment-container .PennController-after {
      line-height: 2.5em;
    }

    Jeremy

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.