Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Form actions should point to a centrally-hosted script (searchgate.php) that determines the type of search being performed and directs the query to the appropriate appliance.

Code Block
<form action="httphttps://search.uci.edu/" method="get">
	<input name="collection" type="hidden" value="uci_full"/>
	<label for="search-text">Search</label>
	<input id="search-text" name="q" placeholder="Search..." type="text"/>
	<button name="type" type="submit" value="Web">Web</button>
</form>

...

Here we add a second button with a value of "People". That's all... searchgate figures out the rest.

Code Block
<form action="httphttps://search.uci.edu/" method="get">
	<input name="collection" type="hidden" value="uci_full"/>
	<label for="search-text">Search</label>
	<input id="search-text" name="q" placeholder="Search..." type="text"/>
	<button name="type" type="submit" value="Web">Web</button>
	<button name="type" type="submit" value="People">People</button>
</form>

...

Add class attributes to the form elements to tie them in to your site css. You're also welcome to nest form controls inside <div>s or whatever as needed. For example, sites that use Bootstrap 3 (such as those built with the 2015 Cascade templates) use available Bootstrap classes and also nest the form buttons inside a <div>.

Code Block
<form action="httphttps://search.uci.edu/" class="form-inline" method="get">
	<input name="collection" type="hidden" value="uci_full">
	<label class="sr-only" for="search-text">Search</label>
	<input class="form-control" id="search-text" name="q" placeholder="Search..." type="text">
	<div class="btn-group">
		<button class="btn btn-default" name="type" type="submit" value="Web">Web</button>
		<button class="btn btn-default" name="type" type="submit" value="People">People</button>
	</div>
</form>

...