Results 1 to 3 of 3
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    2
    Greetings everyone, I've got, what is to me, a complex question. I am building pages for products, the products have, of course, image, description, price 'and' a drop down for colors. How would I format WM to do the drop down. For the life of me I can't figure out how to do it. The html code would look like this after output:

    <option value="Red">Red</option>
    <option value="Blue">Blue</option>

    Ok you get the point, that is what I need as a result. Anyone have any suggestions? I tried the [wm-if] but had no success. Thank you very much.

    Matthew

  2. #2
    Newbie
    Join Date
    January 18th, 2005
    Posts
    2
    Let me simplify this a bit more. In excel I have a column called Color, and in that cell you would have: Red,Green,Blue

    How would I get WM to output a drop down menu for that?

  3. #3
    ABW Ambassador Nature Boy's Avatar
    Join Date
    January 18th, 2005
    Location
    Tennessee
    Posts
    1,423
    If excel has a column called color, with one cell with Red,Green,Blue, I would do the text to columns trick with comma as a delimiter. This would create 3 columns, I would name them, color, color2, color3.

    speadsheet:
    color|color2|color3
    red |green |blue

    The template code:<pre class="ip-ubbcode-code-pre">&lt;option value="[WM-Field:color]"&gt;[WM-Field:color]&lt;/option&gt;
    &lt;option value="[WM-Field:color2]"&gt;[WM-Field:color2]&lt;/option&gt;
    &lt;option value="[WM-Field:color3]"&gt;[WM-Field:color3]&lt;/option&gt;</pre>
    Of course, if there are only 2 colors for somethings, you'll have a blank option doing it this way. It may be better to do an if statement:<pre class="ip-ubbcode-code-pre">[WM-If: Field: color = ""][WM-Else]&lt;option value="[WM-Field:color]"&gt;[WM-Field:color]&lt;/option&gt;[/WM-If]
    [WM-If: Field: color2 = ""][WM-Else]&lt;option value="[WM-Field:color2]"&gt;[WM-Field:color2]&lt;/option&gt;[/WM-If]
    [WM-If: Field: color3 = ""][WM-Else]&lt;option value="[WM-Field:color3]"&gt;[WM-Field:color3]&lt;/option&gt;[/WM-If]</pre>

    Hope this works and helps.

    -----------------------------
    Scott

    Have a nice day unless you have other plans

  4. Newsletter Signup

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •