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

Custom items

  1. #1

    Custom items

    On the custom items, I am having a problem making the background look like the other items. Is there an html code I can use? I tried the one suggested but it didn’t work when I tried to do multiple variables.

  2. #2
    Hi Cnslab,

    Have you taken a look at the Custom Items section within the documentation?
    http://www.empirisoft.com/medialab/help/index.html?custom_items.htm

    Once you've read through the documentation, you may also want to try testing out and then manipulating the custom item sample files.

    Regards,
    Trevor

  3. #3
    jarvis24 Blair Jarvis, Administrator
    Also of note here--after some revisions of how custom items were initially handled in v2006, we created an insertable variable called <ml.styles>. If you add this to your HTML code then MediaLab will automatically insert the colors and fonts you are using at the time on regular items. It's a really easy way to have your custom items match the look and feel of regular items. Note the line to add is "<style><ml.styles></style>". The following is a custom item that asks multiple demographic items on one page, taken from the v2008 "Sample 5 Custom Items" folder. Note also the inclusion of the line "...saved from URL..."--this is included to prevent HTML security warnings.

    &lt;!-- saved from url=(0013)about:internet --&gt;
    &lt;style&gt;&lt;ml.styles&gt;&lt;/style&gt;
    &lt;body onload=&quot;document.form.name.focus();&quot;&gt;
    &lt;form name=&quot;form&quot; method=&quot;post&quot;&gt;
    &lt;ml.wording&gt;&lt;br&gt;&lt;br&gt;
    &lt;table&gt;
    &lt;tr&gt;&lt;td&gt; Name? &lt;/td&gt;&lt;td&gt; &lt;input name=&quot;name&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt; Age? &lt;/td&gt;&lt;td&gt; &lt;input name=&quot;age&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt; Sex? &lt;/td&gt;&lt;td&gt; &lt;input name=&quot;sex&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt; Ethnicity? &lt;/td&gt;&lt;td&gt; &lt;input name=&quot;ethnicity&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt; Marital Status? &lt;/td&gt;&lt;td&gt; &lt;input name=&quot;marital&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt; &lt;br&gt;&lt;input type=&quot;submit&quot; value=&quot;Continue&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;/table&gt;
    &lt;/form&gt;
    &lt;/body&gt;


    This might look way harder than it actually is. Again as Trevor suggested above, be sure to check out the chapter on custom items in the users guide and try running and modifying the samples to suit your needs. Try also searching for "custom items" here in the forums to turn up some additional samples and issues that have been dealt with.