Artisio Webapp + Timed Auctions
  • Getting Started
  • Configuration Options
  • My Profile Integration
  • Single Sign On
  • Global Search
  • Template Configuration
  • Auction Details
  • Auction Filters Section
  • Auction List Item
  • Auction Listing page
  • Auction View Page
  • Lot list item template on watchlist
  • Favorite lot listing page
  • Home page
  • Lot list item template on my bids page
  • My bids lot listing page
  • Lot bidding section
  • Lot bidding section for live auctions
  • Lot filtering section
  • Lot list item
  • Lot listing section
  • Lot view page template
  • Update Profile Page
  • Sell an item modal
  • Signup page inputs section
Webhooks
Release Notes
  • Getting Started
  • Configuration Options
  • My Profile Integration
  • Single Sign On
  • Global Search
  • Template Configuration
  • Auction Details
  • Auction Filters Section
  • Auction List Item
  • Auction Listing page
  • Auction View Page
  • Lot list item template on watchlist
  • Favorite lot listing page
  • Home page
  • Lot list item template on my bids page
  • My bids lot listing page
  • Lot bidding section
  • Lot bidding section for live auctions
  • Lot filtering section
  • Lot list item
  • Lot listing section
  • Lot view page template
  • Update Profile Page
  • Sell an item modal
  • Signup page inputs section
Webhooks
Release Notes
  • Artisio Webapp

    • Getting Started
    • Configuration Options
    • My Profile Integration
    • Single Sign On
    • Global Search
      • 1. Create HTML <form> and <input> tags
      • 2. Listen to form submission
      • Full Example
    • Release Notes

Global Search

In order to create global search form on your website to search for lots follow these steps.

1. Create HTML <form> and <input> tags

Give the form action to be lots' URL of Artisio Webapp (Ex: {path_of_webapp_page}#/lots). Set the method to be GET and set the name of the <input> to be q.

<form action="#/lots" method="GET">
    <input type="text" placeholder="Search for Lots" name="q">
</form>

2. Listen to form submission

Select the form using JavaScript (The most common is to give the form ID and select by ID), listen to it's submission and redirect to /lots URL, but append q query parameter as well.

const searchForm = document.getElementById("searchForm");
const onSearch = (ev) => {
  ev.preventDefault();
  const form = ev.target;
  window.location.href = form.action + "?q=" + form.q.value;
};

if (searchForm) searchForm.addEventListener("submit", onSearch);

Full Example

<form id="searchForm" action="#/lots" method="GET">
    <input type="text" placeholder="Search for Lots" name="q">
</form>
<script>
  document.addEventListener('DOMContentLoaded', () => {
    const searchForm = document.getElementById("searchForm");
    const onSearch = (ev) => {
      ev.preventDefault();
      const form = ev.target;
      window.location.href = form.action + "?q=" + form.q.value;
    };

    if (searchForm) searchForm.addEventListener("submit", onSearch);
  })
</script>
Last Updated:
Contributors: Zura Sekhniashvili
Prev
Single Sign On
Next
Release Notes