Looking for the old docs site? You can still view it for a limited time here.

Build Advanced Search Forms

The Builder components let you provide an advanced search form for the user. Based on settings this will allow him to interactively add filters to the query or use a form of preset options.

Usage

The core component of the Builder is the form tag. In the body of the form tag, you can provide a number of optional tags that will determine how the various components of the query are rendered and displayed to ther user:

<builder:form query="${query}"
              fields="title=Title,description=Description,category=Categories,source=Source,pubdate=Date,rank=Score"
              mode="preset" showOperators="false">
    <builder:query label="Query" />
    <builder:text when="title,description"/>
    <builder:capsule when="category"/>
    <builder:range when="pubdate" date="true" jsFormat="dd/mm/yy" javaFormat="dd/MM/yyyy"/>
</builder:form>

The builder tags must be used within <block:searchHeader> tags.