Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Extending Search Form

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

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

Page: 1
Go to End
Author Topic: 1379 Views
  • Nadee
    Avatar
    Community Member
    12 Posts

    Extending Search Form Link to this post

    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.

  • Nadee
    Avatar
    Community Member
    12 Posts

    Re: Extending Search Form Link to this post

    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>

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Extending Search Form Link to this post

    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; }

    1379 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.