Howdy, Stranger!

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

Supported by

Widget and variables

Hello everybody!

How can I add an already configured variable to a widget? I would like to ask my participants some questions about the answers they already provided?

Thanks in advance.

Comments

  • Hi @Gio38000 ,


    Welcome to the forum!


    As you probably noticed, something like the following won't work, because the content of both text_input items ("first_question" and "follow_up_question") are prepared in the prepare phase of the experiment, and at this time the answer to the first question is not yet known.



    As a work-around, you can try something like the following structure, where you can use the response to the first question by using the square-bracket syntax like so:




    See this working example:




    Does this help?


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Hello!


    Thank you very much for your answer, but my question is about coding in Python actually. I will try to be more specific:

    1. I ask the participants to give me some answers (item by item) and for this, I used "form_base" (javascript) as you can see in the screenshot.
    2. Then I want them to judge their own answer and for that, I used inline_script (python).

    I already managed to code to make their answers appear one by one as you can see circled in green (that works very well). But now I want to make all the answers (i.e., items) appear. I think I need a line code for that. I already tried (as you can see circled in red) but it did not work.

    Do you have some ideas?


  • Hi Gio,

    I am a little confused. As far as I know it is not possible to combine inline_javascript with inline_python. One only works online, the other only in the lab version. Also form_base" should not be available for Javascript. Based on your screenshot, I think you use the Python implementations, to run the form_base and your custom made form in the while loop, but with HTML-formatting in the label field. Does this make sense?

    Can you try to put an "f" before the string? Like this:

    label_recall = Label(text=f"Vous...")

    This could work. If not you might have to extract the var.response_letter variable from the var object first. For example by:

    resp_letter = var.response_letter

    And then have

    {resp_letter}

    in your string.

    Hope this helps,

    Eduard

    Buy Me A Coffee

  • Hello,

    Thank you guys.

    Problem solved.

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