agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq,
agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq ,
dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu
http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan
BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama
Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga
BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai
Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah
Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai
Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs
Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games
Comments
Hi Johannes,
It seems that there is no simple option or command to take care of this directly (based on http://osdoc.cogsci.nl/forms/form-variables/#in-custom-forms)
However, when no choice was made, the my_response_var would be set to 'no', and you can use this to your advantage. Basically, you would place your custom form in a loop item. In the loop item, check the 'advanced options' box and insert the Break if command:
=self.get('my_response_var') != 'no'. Thus, the custom form would be repeated until there is something else than a 'no'.
Of course it might be nice to add a copy of the custom form to the loop (so both forms would have to go in a sequence item that itself is placed in a loop item), with the addition of a text line such as "Please choose an option!", and for the second form insert the run-if command: =self.get('my_response_var') == 'no'.
Additionally, you would need to make an inline script (placed outside of the loop) with some code to make sure the first form isn't run if the second form is run. You can do this by making a variable, e.g. 'CHECK' and set it to False, and then write code (this time IN the loop) to set it to True if my_response_var == 'no'. Next, for the first form you would have to insert the run-if command: =self.get('CHECK') == False.
So what would happen now, is that people see a form, and if they click a button without choosing an option, a text will appear that says "Please choose an option!". The screen will only disappear (i.e. we would break out of the loop) if an option is chosen!
Hope this helps!
Cheers,
Josh
Hi Josh,
Thanks for your help.
I tried this, but my experiment nevertheless either just proceeds if the next button is pressed or it just quits (i.e. the break command ends the loop, but the loop does not run again). Here is a minimal working example:
Could you indicate to me where I am going wrong?
Thank you,
Johannes
Hi Johannes,
I can't tell you why your script isn't working, because OpenSesame doesn't allow me to import it for some strange reasons, but I suspect the reason could be related to the
prepare-run
phases. In any way, here is a small example of a script that should do what you want it to.Let us know, if there are other problems.
Eduard
Hi Eduard,
Thank you for providing this example script. My misunderstanding was that I tried to solve the problem by using nested loops.
I now tried out your example script and I have some questions. So what happens is the following:
I start the script and if I do not select a checkbox it processes a second loop which is essentially a copy of the first but with a warning message and a break if condition. I guess you have added the second, different row in the second loop to make the processing just more visible?
However, if I do not select anything, the experiment ends after 3 cycles. That's because the second is repeated 3 times. That would be bad in a real experiment, as the first loop would just not be processed anymore, no matter if there are still lines in it.
Thus, my questions are:
1) To be totally sure that a participant cannot accidentally end the experiment I would need to set the repeat value of the second loop to a very high number?
2) I initially thought that internally/behind the GUI of OS the break if condition would turn the for loop of a loop item into a while loop. But this does not seem to be the case. But with a while loop I could achieve an potentially endless processing until a break condition is met, couldn't I? Is this possible via the GUI only?
3) If my first loop item has 20 lines from which OS chooses randomly, how can I make sure that OS chooses the same line in the second loop that was chosen in the first loop and repeats only this line and does not go on with the next line in the second loop?
Best,
Johannes
Update
Thanks to Eduards comment in another thread I managed to get a working solution by using a python inline script.
I just used a separate
form.render()
followed by a finalform.exec()
call. I enclosed theform.render()
in awhile True:
loop with a break if condition that is met only when the checkbox response variable was!='no'
. That did the trick.However, I am still unsure if this would be also possible using the GUI and I'd like to know what the break if in the advanced loop options is doing behind the scenes.
Johannes
Hi Johannes,
Nice to hear that it works now. But just for sakes of completeness here the things that I know:
Yes. I haven't work much with forms yet. So, I just copied your code a bit to check things out.
Right. I chose a value of three, just to test the script and don't have to repeat it forever
I'm not super sure, but I think there is no
while
loop possible with the GUIloop
items. Every time when other users had similar problems, for whichwhile
loops were a solution, Sebastiaan's suggestion was to use an absurdly high value ofrepeats
that creates virtually awhile
loop. I suppose @Sebastiaan, can tell you more about this matter, if wished.I haven't tried it myself, but I think you could create the second
loop
in a way, that it doesn't provide any new information to theform
. What I mean is that the all information that you need to built theform
(e.g. your 'text1' variable, if I remember right), are not provided by the secondloop
, but passed on from earlier in the experiment, i.e. the firstloop
and its elements. So basically, the secondloop
is in a sense empty and merely a wrapper around yourform
. Do you understand, what I am trying to explain?I hope this cleared things up.
Eduard
Hey there, I am facing the same challenge Johannis did about 2 years ago. I have a form item where participants use a rating scale to evaluate a stimulus. I would like that participants are only able to proceed once they have provided an answer. If the "next" button is pressed without filling in the rating scale, I would like the same stimulus to be repeated, with the note "Please provide an answer" (as mentioned above).
By now the link eduard provided to a small script with a solution is dead, and without it it is too difficult for me to understand this thread. Could you repload the sample script somewhere?
Hi Mati,
OpenSesame 3.2 allows you to validate form input, so the solution posted above is no longer necessary. See here:
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi there,
I need also help with the validation. The Information in the link helps to validate my form base, when there are only checkboxes inside. But I have also rating scales and when I use the validation for this form base it puts checkmarks in the rating-scale and I don't know what to change in the inline script to solve this problem. The second problem is, that I want that my subjects can press the next button when they answered the rating scale with yes but when they answered it with no they have to fill in a word in a text-input and only then they should be able to proceed. In this case the question is not, if they have answered the rating scale, rather if they answered with yes they can go on to the next page, but if not they have to fill in the text input and only if this is answered they should go on. I Have read a lot of the posts here but I can't find the right solution. Until now I have added an inline script so that they have to answer the rating scale and then they can proceed but that's not what I want. Is there anyone who
can help to fix this problem? I think I need some more if statements in the while loop, but I don't know how to build them.
Thanks in advance
Sabrina
Hi Sabrina,
Just to avoid confusion: form validation does not work with a
form_base
item. It requires Python scripting (i.e. aninline_script
item), as also shown in the documentation. Are you sure you're not trying to paste Python code into the script of aform_base
item? (Which won't work.)This isn't entirely clear to me. Perhaps you can upload your experiment to illustrate the issue?
In that case, you'll need a slightly more complicated check in the form validation function (
my_form_validator()
). You can see how this could work below, with comments explaining the logic.Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
thanks for your reply and sorry for the confusion betwenn form_base and form_validator.
This results because I want to fix the Problem that I discribed above first with a form_base and an inline_script_item, which includes a script from Lotje that checks if the rating scale is answered and if not then it shows a warning message. This works quit good, but not for the text_input. And because of that I don't know what syntax is needed in the inline_script_item to fix it I want to try it with form_validator.
I ad your syntax into my form_validator and it works as it should, but not for the first rating_scale. I'm not able to set a checkmark, may be I forgot something or it is because of the diffrent defaults (checkbox=no and rating_scale=none).
Here it is:
Is it also possible to add in this script a warning message. Because the questionnaire is for childrens and I don't know if they understand what to do when the form stays open until a response is given.
Or is it better to use the first way with the form_base and the inline_script Item, but which syntax should I use to solve the problem for what you wrote me the syntax for the form validator.
I hope I'm not confusing you again.
My second question is if I can use this answer of the rating-scale to split my experiment in two sequences. In that way that if they answered the rating_scale with yes then the subjects get sequence A (for example questionnaire A with 20 Items) and if they answered with no they get sequence B.
May be I can use the syntax from this discussion am I right?
https://forum.cogsci.nl/.../set-a-different-path-in-the-experiment-depending- on-the-multiple-choice-response
Now realy this is my last question. Can I change the color of the background and the foreground in the form_validator like in a formbase "set background". The first sequence in my experiment is an IAT and the second sequence is a questionnaire. The IAT backround is black and the questionnaire background should be white. Is this possible?
I'm so sorry for the many question but I'm very thankfull for your help.
Greetings Sabrina smile:
Hi Sabrina,
This part of your code:
is probably part of the problem. The last line (return var.Alter....) will never be executing, because the previous line (return False), will always terminate the function (if it hasn't been already terminated). So, what you want is probably this:
In general, the form validator should never return anything else than True of False.
You can use the run-if field to decide which items to run. I attach an example experiment that implements this. Let me know if you don't understand how it works.
As far as I can see you can't change the background of a form directly, but it can be adapted by passing an item to the item keyword because the form takes the foreground and background color of that item. Unfortunately, I don't really know what exactly a valid item would be that you could pass to the form. Maybe @sebastiaan can help out?
Eduard
The easiest way to do it is to simply change the
background
variable before the form, and then (if necessary) reset it right after. Like so:Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi together,
with your help it was possible to change the color and to split my experiment into two sequences.
But the problem that the first rating_scale ist not clickable is still the same (the gender_rating_scale above). I have changed the rating_scale into two checkboxes. And also with the checkboxes it is the same. Particularly when the checkbox (1,1) is in the same row with the question (0,1). I don't understand this. I put the checkboxes in the row below the question and then it is working.
Is it possible to add in the form validator a warning message or is this only possible with an form_base_item and an added inline_script_item including a while loop?
Thanks a lot again
Sabrina
Edited to fix validation script
The problem is that the widgets in your form overlap. Notably, you've set the
colspan
of theLabel
widgets on the left to 2. That means that they also cover the right column, thus covering theRatingScale
that sits underneath. Does that make sense?That's possible. In the validation function (here
my_form_validator()
) you can simply create aCanvas
with some warning message and show it. Then you also want to re-show the original form canvas to avoid visual artifacts. I adapted the example from the documentation below. You can try to figure out how to apply this to your own code!The problem is that the widgets in your form overlap. Notably, you've set the
colspan
of theLabel
widgets on the left to 2. That means that they also cover the right column, thus covering theRatingScale
that sits underneath. Does that make sense?Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sabastiaan,
when I use your syntax (I should use the second one with clock.sleep (1000) right?) then is the warning message also shortly shown when I answered the Checkboxes and the text-input and also I cant press the next button because it is going to the next page by it self. Am I doing something wrong?
I have said that I changed to the validator, but before I used a form base and an inlinscript from Lotje with a while loop, that shows the warning mesaage and when it goes back to the form the answeres which habe been clickt are still there. When the subjects fill out the answer they have forgotten they can go on. Is this able to combine this with the syntax you wrote?
here is while loop which I used before.
while True:
# Make a variable storing whether the form is completely filled
# in on or not. The starting value is False. If one of the
# 'checks' below is not met, its set to True:
incomplete = False
Thank you so much for your help
Sabrina
Hi together,
in the last time my experiment crashes very often and don't runs until the end. Under the point Details is standing: items stack:?`` and Python seems to have crashed. This should not happen. If Python crashes often, please report it on the OpenSesame forum.
Do you know what to do to solve this?
Thanks Sabrina
Hi Sabrina,
That's unfortunate. This error means that the Python interpreter itself crashed, which is never due to a bug in the experiment. (I.e. it's not something that you do wrong. It's a problem with Python or one of the underlying libraries.)
If you find that the experiment consistently crashes at the same moment, then you can see if there's something you can change to work around it. Is the crash consistent?
If not, then your best bet is to switch to a different version of OpenSesame, for example the version based on Python 3. These crashes are generally specific to a system in combination with some version of Python, so simply changing either of those sometimes makes the problem go away.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
yes the crash is mostly consistent. I have an IAT sequence (it is a template) and at the same level I add a questionniare sequence (could this be the problem?). The IAT is runing, but the questioniare sequence crashes very often. This questionaire exists of two diffrent sequences one with about
20 items an the other with 22 items.
Hi Sebastiaan,
can you tell me what I'm doing wrong with your syntax (warning message). I used this part right?
But the warning message is also shortly shown when all checkboxes, text inputs etc. have been filled out and then it goes on by it self, so that the next-button could not be clicked. I tried out to put the syntax wihtout the clock.sleep in the prepare phase ant the other one in the run phase but it is not working.
Thanks for your help
Sabrina
Hi Sabrina,
Right, I made an odd mistake in the validation function, because it always showed the warning message, even when the validation passed. To fix this, you have to first check whether the form is ok, if so
return True
right away, if not show theCanvas
andreturn False
. Do you see the logic below?What happens if you run the questionnaire as a separate experiment? Does splitting the experiment up this way make the error go away? These Python crashes are hard to debug, because they don't have a clear cause (or error message). So it's in part a matter of trial and error to see when they do and when they do not occur.
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!