code for search box

  • 1
  • Question
  • Updated 10 years ago
  • Answered
Need code for search box that should look like yola forum search box with green search button
Photo of asgar


  • 11 Posts
  • 0 Reply Likes

Posted 10 years ago

  • 1
Photo of Sanja


  • 10698 Posts
  • 495 Reply Likes
Hello asgar

I'm not sure if this will meet your needs but here are a couple of options for you:

You can add a Google **site** search box by using the Widgetbox Gallery:

This widget will search your site's pages.

1. Drag and drop a Widgetbox Gallery widget onto your page.
2. A dialog box will open, in the search box type "Site Search".
3. Then click on "Search Your Site With Google". This will search just your site, but there will be a Google icon on the widget and possibly ads.
4. Add your domain to "Site to Search"
4. Click on the green 'Get Widget' button and it will be saved and added to your page.
6. Save and preview your page to view the widget.

You can also use a free site search service called siteLevel:

This will search the pages of your site.

1. Go to
2. Fill in your email address and domain name.
3. Click Sign Up
4. Hightlight the Javascript Search Box option and copy it
5. In the Sitebuilder drag and drop an HTML Widget onto your page. The HTML Widget is located on the Widgets Sidebar and is a little blue circle.
6. Paste the code into the dialog box and click "OK".
7. Save and preview your page to view the search box.

You can also add a search box to search Google:

This widget will search Google.

1. Drag and drop a Widgetbox Gallery widget onto your page.
2. A dialogue box will open, click on "Google Search"
3. When the dialog box opens click on the green "Get Widget" button
4. Save and preview your page to view the widget.

Please let me know if you have any trouble with this.
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes

Hi, you can use this code right here. This code will be like a Google search page, but, it will be all of your pages only! So all the search results will only be your website! Here's the code (I typed this out all my self - I didn't copy anything!):

<form method="get" action="">
<label for="q">Search:</label>
<input id="q" name="q" size="20" maxlength="255" value=""
type="text" />
<input name="domains" value="YOURWEBSITEDOMAIN"
type="hidden" />
<input name="sitesearch" value="YOURWEBSITEDOMAIN"
checked="checked" id="mysite" type="radio" />
<label for="mysite">This Site</label>
<input name="sitesearch" value="" id="web" type="radio" />
<label for="web">The Web</label>
<input name="btnG" value="Search" type="submit" />


Remember to replace "YOURWEBSITEDOMAIN" with your website's domain. If you don't change it, it wont search your website, it will be an error!

Also, you can use CSS to customize the form and make the search bar and stuff and the submit button look a lot nicer! If you need help with css customizing, and you want me to do it for you or help you with the CSS just let me know!

Hope this code helps!