Search Page Code Sample

Here is some example code to build a search page for the calendar. This is just an example. You have the flexibility to lay out the page to suit your own design.

Below is a screenshot of the layout that this code will build. 

HTML:

Below is the HTML/Branch code that would go in the Template field for the Search Page content template.

<h1>Search</h1>

{if #searchForm.errors}

  <ul class="errors">
    {loop items="#searchForm.errors" value="error"}
      <li class="err">{#error.message}</li>
    {/loop}
  </ul>

{/if}

<div class="search-wrap">
  {#searchForm.tag.open}

  {
loop items="#searchForm.fields" value="field"}
    <div class="field-wrap">
      <label for="{#field.id}">{#field.label}</label>
      {#field.tag}
    </div>
  {/loop}
  <button class="search-btn">Search</button>

  {#searchForm.tag.close}

</div>