Could you please point out what I am doing wrong?
I get this browser console error:
Uncaught ReferenceError: searchBox is not defined at (index):2107:144
The platform won’t let me put custom HTML in the sitewide header element – only the HEAD tag, the top of BODY tag, and elements below the sitewide header.
It uses its own code for a search bar, which is wrapped inside a DIV with classname “search-wrapper”. I have to use another script to modify that DIV at runtime, so it is instead Algolia searchbar.
Attached is a screenshot of my code implementation. (I couldn’t direct copy-paste due to 403 error.) You can use Blackbox on VS Code to OCR it into text.
Could you please tell me what I am doing wrong in my code?
P.S. For privacy I have left out my API, App ID and index name, which elsewhere I’ve successfully authenticated and set requests to.