Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

Repeating a custom item that has multiple questions?

  1. #1
    jarvis24 Blair Jarvis, Administrator

    Repeating a custom item that has multiple questions?

    [edited from support email]
    I'm trying to use a custom HTML object to get three numerical responses per page. I will, however, be using this custom object 5+ times, and would perhaps like to randomize the order. I would like to avoid coding all the pages separately, so is there a way to use the < ml.variable> command for three different variables on the same page? If there is, would you be able to send me some sample code? I tend to understand it better that way. Thanks!

  2. #2
    jarvis24 Blair Jarvis, Administrator
    Sounds like you have read the section in the guide on custom items, yes? If not, here is a link to it online:

    www.empirisoft.com/medialab/help/custom_items.htm

    I think what you are looking for may be this:

    Combining this:
    &lt;form method=&quot;post&quot;&gt;
    &lt;ml.wording&gt;
    &lt;input name=&quot;&lt;ml.varname&gt;&quot;&gt;
    &lt;input type=&quot;submit&quot; value=&quot;Continue&quot;&quot;&gt;
    &lt;/form&gt;
    With this:
    &lt;form method=&quot;post&quot;&gt;
    Name three good movies:&lt;br&gt;&lt;br&gt;
    &lt;input name=&quot;movies_01&quot;&gt;&lt;br&gt;
    &lt;input name=&quot;movies_02&quot;&gt;&lt;br&gt;
    &lt;input name=&quot;movies_03&quot;&gt;&lt;br&gt;&lt;br&gt;
    &lt;input type=&quot;submit&quot; value=&quot;Continue&quot;&gt;
    &lt;/form&gt;
    And getting this:
    &lt;form method=&quot;post&quot;&gt;
    Name three &lt;ml.wording&gt;:&lt;br&gt;&lt;br&gt;
    &lt;input name=&quot;&lt;ml.varname&gt;_01&quot;&gt;&lt;br&gt;
    &lt;input name=&quot;&lt;ml.varname&gt;_02&quot;&gt;&lt;br&gt;
    &lt;input name=&quot;&lt;ml.varname&gt;_03&quot;&gt;&lt;br&gt;&lt;br&gt;
    &lt;input type=&quot;submit&quot; value=&quot;Continue&quot;&gt;
    &lt;/form&gt;

    Just make sure you list (v3) as a parameter each time you call the custom item. If that works for you, let me know!

    -Blair

  3. #3
    Looks great! Any possible way to change the _01, _02 etc. to other things? (I suspect not)

  4. #4
    jarvis24 Blair Jarvis, Administrator
    Nope. I'd be curious to see your final result--send me a copy of you get a chance.

    -Blair

  5. #5
    I actually ended up going another route to make the data easier to group for analysis, and made separate objects for each. Here is what I ended up with.

    It's a little crazy, but this object gathers a best estimate, and upper and lower estimates for a 90% confidence region. The two buttons above the estimates reveal text which will be another participant's estimate, as well as the current participant's previous estimate (If anyone knows how I could get this value from an .xls file to the html, let me know!). The hidden radios at the bottom record whether the first button was pressed. The image shown uses the <ml.bg> function which is really useful!

  6. #6
    jarvis24 Blair Jarvis, Administrator
    Check out http://www.empirisoft.com/support/showthread.php?t=582 for a discussion of your origional sample with respect to inserting values from a responses.xls file.

    Would you mind posting some version of the que file along with the final revised html file, or a simplified version of it so other users could see it in action with MediaLab? i.e., with the automatic background and variables inserted from the xls file (if you get that far!).

    -Blair