MyBB Community Forums

Full Version: What's wrong with this code?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
	<form action="{$mybb->settings['bburl']}/search.php" class="navbar-search" method="post">
		<input placeholder="Keywords" name="keywords" id="search_box" autocomplete="off" title="Enter your search keywords" data-provide="typeahead" data-items="4" data-source='["Testing","MyBB"]' type="text" />
		<button name="submit-search" id="search_button" class="btn btn-success" type="submit">Search</button>
		<input type="hidden" name="action" value="do_search" />
	</form>

I made this code to test Bootstrap and MyBB integration, as a search form. It's put straight into my header_welcomeblock_member template. I checked the source of mybb.com to see if I was missing anything, nothing appears to be missing.

I have a post on my forum with "this should work" on it. When I type in "this should work" with or without quotations, I always get the error "Sorry, but no results were returned using the query information you provided. Please redefine your search terms and try again". I have no idea why it's showing up, because I am sure that there should be a result.

Any ideas why it isn't working? Undecided
Fixed.

It was missing a few lines of HTML. Fixed by adding this:

		<input type="hidden" name="postthread" value="1" />
		<input type="hidden" name="forums" value="all" />
		<input type="hidden" name="showresults" value="threads" />