Jump to:

1969 Posts in 1272 Topics by 606 members

Form Questions

SilverStripe Forums » Form Questions » search form like in the documentation site ?

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

Page: 1
Go to End
Author Topic: 666 Views
  • snaip
    Avatar
    Community Member
    180 Posts

    search form like in the documentation site ? Link to this post

    hi

    how to build search form similar to this http://doc.silverstripe.org/ ?

    typing some word and geting all matches topics (titles)

    my code is

       function SearchForm() {

          $searchText = isset($this->Query) ? $this->Query : 'Znajdź produkt';
          $fields = new FieldSet(
           new TextField("Search", "", $searchText)
           );
          $actions = new FieldSet(
           new FormAction('results', 'szukaj')
           );

           $form = new SearchForm($this, "SearchForm", $fields, $actions);
          $form->classesToSearch(array('SiteTree'));
          return $form;
       }

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