Versions Compared

Key

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

...

The following inputs are accepted:

NameAccepted valuesDescription
qText string(required) The search query
type"Web" or "People"

(optional) Indicated the type of search to perform. Searches with type "Web" are routed to the campus search appliance. Searches with type "People" are routed to the campus directory. If no type or a type other than "Web" or "People" is indicated, the search is treated as type "Web".

collection
domainComma-delimited
numeric
list of domain(optional) Restricts search results to a defined subset of UCI web properties
. Search appliance admins must be notified before this option is used to advise on appropriate value(s). Defaults to all UCI web properties if no value is supplied.

...

. Do not include protocol (use only "communications.uci.edu", not "https://communications.uci.edu"). Multiple domain can be specified (e.g., "communications.uci.edu,brand.uci.edu").

Code Examples

The below are examples only and are not prescriptive. Feel free to experiment with different form markup.

To perform web searches only

...

Code Block
<form action="https://search.uci.edu/" method="get">
	<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>

...

Restricting search results to specified domains

The following example restricts search results to the Official University Policies & Procedures website the  Communications and Brand websites by adding a hidden input that supples the numeric value for that collection. 

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

Styling the search 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="https://search.uci.edu/" class="form-inline"
method="get">
	<input name="collectiondomain" 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>communications.uci.edu,brand.uci.edu">
</form>

Accessibility considerations

...