Help with a simple custom form advancing on button click
Hello. I've never used custom forms in OpenSesame before and I am having some trouble getting this one to work. The relevant portion of my experiment consists of the following, with the syntax for each pasted below:
warning_msg - a sketchpad that defines a warning message
http://pastebin.com/9rKrqSGe
response_DG - a custom form that allows a user to enter information, with a "Next" button below it
http://pastebin.com/dAjWLzW1
enforcement_script - an inline script that returns warning_msg if the user input in response_DG is not an integer between 0 and 40
http://pastebin.com/Dp3Fj1CC
The enforcement_script is borrowed from Lotje's excellent assistance on this thread:
http://forum.cogsci.nl/index.php?p=/discussion/197/solved-multiple-response-collection-on-one-page/p1
Currently, the form requires that I enter numbers, then press [Enter], then click the "Continue" button. Then it repeats the exact same form without advancing. Once I enter the number again, press [Enter] and click "Continue" a second time, it advances to the next steps in the experiment.
What I need is for the user to enter a number, and then tap "Continue" and advance to the next steps without repeating the form. I am using the Droid backend on a tablet, so the users will have to tap the screen.
I am hoping this is simple, but I haven't been able to figure it out from the help pages on forms and button widgets and from the forums.
Thanks!
P.S. A follow-up question I just remembered: is it possible to have a numeric input widget instead of a text_input, such that when users click in the box, the Android number pad pops up instead of the keyboard?
Comments
Hi fowweezer,
about the number pad, I am not entirely sure this is possible. OpenSesame uses the pygame implementation for android to render all its interfaces, and if pygame doesn't offer the option of only presenting an Android number pad, it will not be possible in the experiment. You could write your own number pad implementation which is drawn and handled by OpenSesame, but this might not be worth the effort.
About the form problem: I do not have an android tablet at my disposal to test this myself at the moment, so I will be just guessing here. Are you sure the form that is presented twice is not accidentally duplicated in the experiment overview? If you are presenting the same element two time consecutively, this is expected behavior. Have you also tried running the experiment on your computer, and with a different backend? Does the problem then occur as well?