Jump to:

10990 Posts in 2727 Topics by 1818 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: 664 Views
  • Alex S
    Community Member
    30 Posts

    Search function not valid XHTML Link to this post


    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>
    <% control Fields %>
    <% end_control %>
    <% control Actions %>
    <% end_control %>

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


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.