Jump to:

23581 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » Little things like search field onclick

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 1312 Views
  • cnyaviary
    Community Member
    12 Posts

    Little things like search field onclick Link to this post

    How would I go about putting code to seach field onclick? Like currently, the default term is 'Search' and what i am trying to do is clear that field on click. Or where to change so that the search field is blank by default. Any pointers would be helpful. Thanks,


  • Sam
    679 Posts

    Re: Little things like search field onclick Link to this post

    I would recommend that you use jQuery for this. Any jQuery tutorial should be able to guide you through that.

    To get your javascript files into your site, put code like this into the init() method of the Page_Controller class.


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.