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.

Archive /

Our old forums are still available as a read-only archive.

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

Extending Search Form


Go to End


3 Posts   2217 Views

Avatar
Nadee

Community Member, 12 Posts

21 November 2008 at 6:41pm

Please refer to the attachment (screenshot).

How can I remove the <fieldset> tag in the search form? Earlier it used to render with only the input box and the button but now (2.2.3) there is a fieldset element wrapping the controls making my skin so very ugly.

Thanks.

Avatar
Nadee

Community Member, 12 Posts

21 November 2008 at 10:26pm

I figured it out. Thought others would like to know.

Make a SearchForm.ss on your templates folder and remove what ever you don't want it to have. So mine (<theme name>/templates/SearchForm.ss) is the following.

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

Avatar
Willr

Forum Moderator, 5523 Posts

24 November 2008 at 6:20pm

That border / label is called a legend tag. It is there I believe so the form pass's WCAG validation. Another way to remove it without added another template is to just do #FormIDWhatever legend { display: none; }