Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] form base problem

edited July 2013 in OpenSesame

Dear community,

I'm working on a microexpression experiment and have a question about the form base. The participants have to watch different emotions and have to choose the right answer. So I created the following form:

set margins "50;100;50;100"
set rows "1;1;1;1;1;1;1"
set spacing "25"
set description "A generic form plug-in"
set cols "1;1"
widget 1 0 1 1 button var="fearful" text="Angst"
widget 1 1 1 1 button var="surprised" text="Ueberraschung"
widget 1 2 1 1 button var="angry" text="Aerger"
widget 1 3 1 1 button var="disgusted" text="Ekel"
widget 1 4 1 1 button var="contemptuous" text="Verachtung"
widget 1 5 1 1 button var="sad" text="Trauer"
widget 1 6 1 1 button var="happy" text="Freude"

right before the form the participants see a sketchpad:

set duration "150"
set description "Displays stimuli"
draw image -497 -309 "Rafd090_[Emotion].png" scale=0.604 center=0 show_if="always"

At the moment my logger file looks like this:

image

My goal is to have only one variable in the logger file that shows if the participant chose the right answer or not. Do you have any ideas how I could get this done? Any help is appreciated :-)

Best wishes
Daniel

Comments

  • edited 7:52PM

    Hi Daniel,

    My goal is to have only one variable in the logger file that shows if the participant chose the right answer or not. Do you have any ideas how I could get this done? Any help is appreciated

    You would need to add a simple inline_script after the form, that recodes the variables so that there is a single variable that contains the name of the emotion that has been selected. For example like so:

    # A list of all emotions, which should correspond to
    # the variables in the form.
    emotions = ['fearful', 'surprised',
        'angry', 'disgusted',
        'contemptuous', 'sad',
        'sad']
    
    # Walk through all emotions, and set the variable
    # `emotion_response` to the name of the emotion
    # variable that has been set to yes.
    for emotion in emotions:
        if self.get(emotion) == 'yes':
            exp.set('emotion_response', emotion)
    

    Alternatively, you could use checkbox widgets instead of buttons. Then you wouldn't need to recode at all:

    set margins "50;100;50;100"
    set rows "1;1;1;1;1;1;1"
    set spacing "25"
    set description "A generic form plug-in"
    set cols "1;1"
    widget 1 0 1 1 checkbox click_accepts="yes" text="Angst" var="emotion_response"
    widget 1 1 1 1 checkbox click_accepts="yes" text="Ueberraschung" var="emotion_response"
    widget 1 2 1 1 checkbox click_accepts="yes" text="Aerger" var="emotion_response"
    widget 1 3 1 1 checkbox click_accepts="yes" text="Ekel" var="emotion_response"
    widget 1 4 1 1 checkbox click_accepts="yes" text="Verachtung" var="emotion_response"
    widget 1 5 1 1 checkbox click_accepts="yes" text="Trauer" var="emotion_response"
    widget 1 6 1 1 checkbox click_accepts="yes" text="Freude" var="emotion_response"
    

    Cheers!
    Sebastiaan

  • edited 7:52PM

    Hi Sebastiaan,

    works perfect! Many thanks!

    Best wishes
    Daniel

Sign In or Register to comment.

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