Problem with checkboxes


Author
Message
nkleinselle
nkleinselle
New Member (42 reputation)New Member (42 reputation)New Member (42 reputation)New Member (42 reputation)New Member (42 reputation)New Member (42 reputation)New Member (42 reputation)New Member (42 reputation)New Member (42 reputation)
Group: Forum Members
Posts: 3, Visits: 12
Hi everyone,

At the beginning of my experiment, participants need to pick "significant items" from a list by checking the checkboxes next to it (there are 4 such lists: significantLastname, significantMothername, significantBirthcity, significantFavoritecity).

In the output (data), I correctly see which items were marked. However, the marked items should also be removed from another (identical) list and not appear in the rest of the experiment. However, they do appear in the experiment... Please see below part of the script. Im also attaching the entire exp as a zip. file.

I hope someone can help :)
Nathalie




<checkboxes significantLastname>
/ required = false
/ range = (0,12)
/ position = (80%, 35%)
/ size = (80%, 50%)
/ options = (    "אלדן",
                "אלרון",
                "גרינברג",
                "גולדברג",
                "שטרית",
                "שילון",
                "אגמון",
                "מרידור",
                "רחמים",
                "כוכבי",
                "תירוש",
                "אבנרי",
                "בנימיני",
                "רשף",
                "אוחנה",
                "לוינסון"
                )
</checkboxes>

<surveypage significantLastname>
/ questions = [1 = significantLastnameInstructions, significantLastname]
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ itemfontstyle = ("Arial", 3%, true, false, false, false, 5, 1)
/ responsefontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/ showpagenumbers = false
/ showquestionnumbers = false
/ ontrialend = [
        if(checkboxes.significantLastname.checked.1) {
   item.Lastnames.removeitem(1);
  };
   if(checkboxes.significantLastname.checked.2) {
   item.Lastnames.removeitem(2);
  };
   if(checkboxes.significantLastname.checked.3) {
   item.Lastnames.removeitem(3);
  };
   if(checkboxes.significantLastname.checked.4) {
   item.Lastnames.removeitem(4);
  };
        if(checkboxes.significantLastname.checked.5) {
   item.Lastnames.removeitem(5);
  };
        if(checkboxes.significantLastname.checked.6) {
   item.Lastnames.removeitem(6);
  };
        if(checkboxes.significantLastname.checked.7) {
   item.Lastnames.removeitem(7);
  };
        if(checkboxes.significantLastname.checked.8) {
   item.Lastnames.removeitem(8);
  };
        if(checkboxes.significantLastname.checked.9) {
   item.Lastnames.removeitem(9);
  };
        if(checkboxes.significantLastname.checked.10) {
   item.Lastnames.removeitem(10);
  };
        if(checkboxes.significantLastname.checked.11) {
   item.Lastnames.removeitem(11);
  };
        if(checkboxes.significantLastname.checked.12) {
   item.Lastnames.removeitem(12);
  };
        if(checkboxes.significantLastname.checked.13) {
   item.Lastnames.removeitem(13);
  };
        if(checkboxes.significantLastname.checked.14) {
   item.Lastnames.removeitem(14);
  };
        if(checkboxes.significantLastname.checked.15) {
   item.Lastnames.removeitem(15);
  };
        if(checkboxes.significantLastname.checked.16) {
   item.Lastnames.removeitem(16);
  };
]
/ ontrialend = [
  var i = 0;
  while (i < item.Lastnames.itemcount){
   i += 1;
   list.controlLastname.appenditem(i);
  };
  item.controlItems.appenditem(item.Lastnames.item(list.controlLastname.nextvalue));
  item.controlItems.appenditem(item.Lastnames.item(list.controlLastname.nextvalue));
  item.controlItems.appenditem(item.Lastnames.item(list.controlLastname.nextvalue));
  item.controlItems.appenditem(item.Lastnames.item(list.controlLastname.nextvalue));
  ]
</surveypage>

<list controlLastname>
/ selectionrate = always
</list>

Attachments
relastfixesinourexp.zip (125 views, 489.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search