Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

OpenSesame forms: text

Hey! I'm trying to set up the text form (form_text_display) for my exp, but it runs somehow wrong: when I insert the data into the box (age in this case), the button "Ok" simply doesn't work. I can proceed by using "Enter" on my keyboard; however, it's not very convenient to explain every participant in the study why they cannot use "Ok" button. What might be the reason for the problem?

set timeout infinite
set spacing 10
set rows "1;2;2;1;2;1"
set only_render no
set ok_text Ok
set margins "50;50;50;50"
set form_title "<span size=24>Age</span>"
set form_text "Your age"
set description "A simple text display form"
set cols "1;1;1"
set _theme gray
widget 0 0 3 1 label text="[form_title]"
widget 0 2 3 1 label center=no text="[form_text]"
widget 1 3 1 1 text_input return_accepts=yes var=age
widget 1 5 1 1 button text="[ok_text]"_

P.S.: another quick question: is there any way to restrict the type of characters in the box so that only numerical values are possible?
Thanks in advance!

Comments

  • eduardeduard Posts: 1,105
    edited February 1

    Hi Alex,

    it's not very convenient to explain every participant in the study why they cannot use "Ok" button.

    If you set return_accepts to False the OK-button should work again. For some reasons they don't work together. Not sure whether this is desired behaviour or a bug (@sebastiaan?)

    is there any way to restrict the type of characters in the box so that only numerical values are possible?

    No easy way, but there are work arounds. If you browse the forum for that problem, you should find a couple of discussions that will help you. I haven't ever done it myself, so I would need to look it up myself.

    Good luck,

    Eduard

    edit: Maybe as a starter: http://forum.cogsci.nl/index.php?p=/discussion/197/solved-multiple-response-collection-on-one-page/p1

  • sebastiaansebastiaan Posts: 2,947

    Hi guys,

    I would recommend upgrading to OpenSesame 3.2, which will be released soon (but now it's still in prerelease). You'll find that the forms will be much smoother, and the text_input also no longer completely captures all mouse and keyboard input so that you can still reach the Ok button.

    P.S.: another quick question: is there any way to restrict the type of characters in the box so that only numerical values are possible?

    Yes!

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • Alex_MAlex_M Posts: 4

    Thank you Eduard and Sebastiaan!

Sign In or Register to comment.