Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Search function not valid XHTML


Go to End


1527 Views

Avatar
Alex S

Community Member, 30 Posts

9 February 2009 at 6:20am

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