Form controller - drop-down list support

Skip to first unread message

Shane Ebert

Jul 3, 2013, 7:41:25 PM7/3/13
Hi Alex.  I was wondering if it would be possible to support drop-down lists (<select>) with the Form controller? I guess I could use a text area and put the options afterwards, but it wouldn't be as clean.

Thank you so much,

Corey Cusimano

Aug 26, 2013, 11:55:56 AM8/26/13

I added this to the Form controller:

                var drops = $(dom).find("select");
                for (var i = 0; i < drops.length; ++i) {
                    var drop = $(drops[i]);

                    rlines.push([["Field name", drop.attr('name')],
                                 ["Field value", drop.attr('value')]]);

which allowed me to save the selection people made. Let me know if it works for you!

Shane Ebert

Aug 28, 2013, 8:38:54 PM8/28/13
Yes, that did it.  Thanks!  I ended up adding the ability to generate a warning if the participant doesn't pick an option.  This assumes that all menu's start with a blank item so that participants have to pick something, and this item has the value "BLANK".

First, you have to put this code somewhere above the code you provided, probably with the other similar declarations near the top of the controller script:

        this.obligatoryMenuErrorGenerator =
            dget(this.options, "obligatoryMenuErrorGenerator",
                 function (field) { return "Please pick an option for the menu \u2018" + field + "\u2019."; });

And then in side your code, you can add:

  if (select.attr('value') == "BLANK") {
              alertOrAddError(select.attr('name'), t.obligatoryMenuErrorGenerator(select.attr('name')));

It worked for me, so hopefully it will work for other people.

Alex Drummond

Aug 28, 2013, 8:51:59 PM8/28/13
Thanks guys, I will add this code to the next version.
You received this message because you are subscribed to the Google Groups "ibexexperiments" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Diogo Almeida

Apr 6, 2019, 3:59:01 PM4/6/19
to ibexexperiments
I am having the same problem with dropdown lists not showing up on the results file, and I found this thread. Unfortunately, it does not seem that this solution has been incorporated in the current version of Ibex (as of April 2019). Should I open an issue on Github?


To unsubscribe from this group and stop receiving emails from it, send an email to

giuliano bocci

Aug 12, 2021, 2:27:11 PM8/12/21
to ibexexperiments
Hi Alex, hi everyone, 
I know it's old post, but I was wondering if you may have a quick fix.
I am trying to add a couple few drop-down menus to an experiment. I have updated the form controller as proposed by Shane and it works like a charm in the old version of ibexfarm (
However, by using the same controller (and the same html page) in the new version of ibexfarm ( the value selected from the drop-down list is not reported in the results. 
Am I missing something? Any piece of advice? 

Thanks in advance!


To unsubscribe from this group and stop receiving emails from it, send an email to
Reply all
Reply to author
0 new messages