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

HTML forms set within MediaLab

  1. #1

    HTML forms set within MediaLab

    Hi, this is more of an HTML question than a MediaLab one, but I thought I'd ask.

    I want to insert an HTML form within MediaLab. I know how to put HTML documents within Medialab, but I want to use an HTML document that also has forms that participants can enter responses into and then submit. I'd like these submitted responses to be written to my computer's hard drive.

    Can anyone advise me on how to do this?

    Thanks,
    David

  2. #2
    Easy going. Declare a variable name in ML, and use that name for all of your HTML-variables + an identifier.

    Easy example for a 2 item questionnaire with 2 answering options (in the example, I use radio bottons, as you can see):

    <input type="radio" name="nbp_01" value="1">
    <input type="radio" name="nbp_01" value="2">

    <input type="radio" name="nbp_02" value="1">
    <input type="radio" name="nbp_02" value="2">

    The variable name in the ML questionnaire is "nbp" and you use the HTML-item-type. The identifier is "_xx")
    In my example, you should find two variables in your data output, a "nbp_01" + value from the subject and a "nbp_02" + the value from a subject.

    Normally, this works.
    best,
    Tom

    P.S. I guess there is a tutorial and an example about stuff like this which is shipped with ML..?

  3. #3
    Thanks Thomas!

    There's also samples that show you exactly how to do this kind of thing within the user guide. Check out the section entitled "Custom Items" or read through the help online here:
    http://www.empirisoft.com/medialab/help/custom_items.htm