Jump to:

10848 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Search function not valid XHTML

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 633 Views
  • Alex S
    Avatar
    Community Member
    30 Posts

    Search function not valid XHTML Link to this post

    Hey,

    I saw a topic started a while back about the search function not validating as XHTML but I couldn't reply to it as it's in the archive, so I thought I'd do a new one.

    I'm using the W3C validator which doesn't like the 'input' tags being nested in just a form element, giving the following error:

    document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag.

    I fixed this by modifying 'Sapphire'>'templates'>'SearchForm.ss' to have a 'fieldset' tag, it now reads:

    <form $FormAttributes>
    <fieldset>
    <% control Fields %>
       $FieldHolder
    <% end_control %>
    <% control Actions %>
       $Field
    <% end_control %>
    </fieldset>
    </form>

    I couldn't see another solution on the boards so I hope this is some use to people

    Alex

    633 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.