Community Forums 

Main Content

remove comma from lines

    Feb 29 2012 02:01:41

    #1

    pcguy

    Join date : 2008-09-18      Posts : 130

    when items go int the cart there is a comma in the front of them

    eg -

    Aviator Harness
    , Size - Petite
    , Colour - Grey

    in my code if I place another comma at the end like this

    <select size="1" name="product[]">
    <option value="">Size</option>
    <option value="{b}Size{/b} - Petite,{br}">Petite</option>
    <option value="{b}Size{/b} - X-Small,{br}">X-Small</option>
    <option value="{b}Size{/b} - Small,{br}">Small</option>
    <option value="{b}Size{/b} - Medium,{br}">Medium</option>
    <option value="{b}Size{/b} - Large,{br}">Large</option>
    <option value="{b}Size{/b} - X-Large,{br}">X-Large</option>
    </select>

    it won't remove the extra comma because the the {br} tags, if I remove the {br} tags it works perfect.
    Is there a way around it so I can still use the {br} tags because there is another option box in my code that is displayed on the last line and it makes it much easier to read with all options on their own lines



    Feb 29 2012 02:28:19

    #2

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    Try moving your break to before the option instead of after.
    <option value="{br}{b}Size{/b} - Petite,">Petite</option>

    Debbie Q

    Mal's Support: www.mals-e.com/support.php
    GT's Forms and examples: www.malsforms.com
    Helpful java scripts: www.gemasana.com/mals
    Shipping help documents: www.stoner.org.uk/mals

    My Create-A-Book Publishing - mycreateabook.com
    Personalized Books, Music CDs and Gifts for all ages and occasions.

    Please help me out and share my site on your networks.