[Wactclc-primo] [EXTERNAL] Widget/Embed Code for Search Box

Ryer Banta ryer.banta at centralia.edu
Tue Aug 2 14:18:39 PDT 2022


Hi Traci,

My first thought is to try separating out the text and links below the search box from the Primo search form. Treat it as two separate elements. This will also make troubleshooting the form easier. Did you previously have all of these elements together?

I wonder if this has to do with the sections that tell it what to do on submission and the target. I have these highlighted in yellow in my example below. I think a few weeks ago someone else had an issue with the target self. Right now yours is set to target blank.

With your current widget, I do notice that the search terms appear in the URL, but they are not resulting in a search being run.

In case it helps, here is a sample, very simple, plain search box of ours.

<form action="https://sbctc-centralia.primo.exlibrisgroup.com/discovery/search" enctype="application/x-www-form-urlencoded; charset=utf-8" id="simple" method="get" name="searchForm" onsubmit="searchPrimo()" target="_self"><!-- Customizable Parameters --><input name="vid" type="hidden" value="01STATEWA_CNTRALIA:CENTRALIA_V1" /> <input name="tab" type="hidden" value="Everything" /> <input name="search_scope" type="hidden" value="MyInst_and_CI" /> <input name="mode" type="hidden" value="basic" /> <!-- Fixed parameters --> <input name="displayMode" type="hidden" value="full" /> <input name="bulkSize" type="hidden" value="10" /> <input name="highlight" type="hidden" value="true" /> <input name="dum" type="hidden" value="true" /> <input id="primoQuery" name="query" type="hidden" /> <input name="displayField" type="hidden" value="all" /> <!-- Enable this if "Expand My Results" is enabled by default in Views Wizard --> <input name="pcAvailabiltyMode" type="hidden" value="true" /> <input id="primoQueryTemp" size="35" type="text" value="" /> <!-- Search Button --> <input alt="Search" id="go" onclick="searchPrimo()" style="height: 1.8em; font-size: 1.2em; font-weight: bold; background: #0E69AA; color: #ffffff; border: 0px solid;" title="Search" type="button" value="Search" /> </form>

Ryer Banta
Information Literacy and Technology Librarian
Pronouns: he/him/his
Centralia College
360-623-8121
Ryer.Banta at centralia.edu<https://mail.centralia.edu/owa/redir.aspx?C=fNEFFUiOcJn8XZD_VNaqVEixJx9QWtNlXDDsY0izFrXf1xAoVYvYCA..&URL=mailto%3aRyer.Banta%40centralia.edu>
Schedule an Appointment<https://centralia.libcal.com/appointments/ryer>
________________________________
From: Wactclc-primo <wactclc-primo-bounces at lists.ctc.edu> on behalf of Traci Taylor <ttaylor at btc.edu>
Sent: Tuesday, August 2, 2022 11:58 AM
To: WACTCLC Primo discussions <wactclc-primo at lists.ctc.edu>
Subject: [EXTERNAL][Wactclc-primo] Widget/Embed Code for Search Box

Caution: This email originated from outside of Centralia College. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Hello,



We made some minor changes to our code for the search box widget.  The only things that were changed were the size type in two places and the link to “Forgot Password.”  We didn’t make any changes to the code beyond these two things. Now when we enter search terms in the search box, it only takes us to the Primo homepage and does not run the search.





[cid:image004.jpg at 01D8A667.3E8B0490]
Here is a screenshot of the search box in one of our LibGuides. Here is the link to the LibGuide<https://btc.ctc.libguides.com/c.php?g=1253093&p=9180434> with the search box, if you want to test it.





Code:



<form name="searchForm" role="search" method="get" action="https://sbctc-btcctc.primo.exlibrisgroup.com/discovery/search?vid=01STATEWA_BTC:BELLINGHAM&sortby=rank&lang=en_US" enctype="application/x-www-form-urlencoded; charset=utf-8" id="simple" target="_blank" class=" ">

<span>Search in:</span>

    <select name="search_scope" style="padding: 0.2em 0.3em; margin-top: 3px; border: 1px solid #CCC; border-radius: 2px;">

      <option value="MyInst_and_CI" selected="">Books, videos, articles & more (All Library Resources)

      </option><option value="MyInstitution">Books, eBooks & media @BTC Library

      </option><option value="CentralIndex">Online journal articles, eBooks & more

                  </option><option value="EBSCO">EBSCO Databases (Journal Articles)

                </option><option value="CourseReserves">Course Reserves

    </option></select>

<br>

    <label>Search for:</label>

  <input type="text" id="primoQueryTemp" value=" " size="55" name="queryTemp" onkeypress="searchKeyPress(event);" class=" ">



<!-- Customizable Parameters -->

<input type="hidden" name="institution" value="01STATEWA_BTC">

<input type="hidden" name="vid" value="01STATEWA_BTC:BELLINGHAM">

<!-- Fixed parameters -->

<input type="hidden" name="displayMode" value="full">

<input type="hidden" name="highlight" value="true">

<input type="hidden" name="dum" value="true">

<input type="hidden" name="query" id="primoQuery">

<input type="hidden" name="displayField" value="all">

<!-- Enable this if "Expand My Results" is enabled by default in Views Wizard -->

<input type="hidden" name="pcAvailabiltyMode" value="true">

<input value="Go" id="go" title="Search" type="submit" onclick="searchPrimo();" class="button radius" style="margin-top:10px; margin-bottom:10px; height: 22px; font-size: 12px; font-weight: bold; background: #DE6E17; color: #ffffff; border: 1px solid;"> <br>

  <a href="https://btc.ctc.libguides.com/c.php?g=1221199&p=8933697" style="color:#0066ff" target="_blank">

  Forgot Password?</a> Or trouble logging in? Try <a href="http://www.btc.edu/General/publications/Student-RemoteAccess.pdf" style="color:#0066ff" target="_blank">Student Remote Access</a>.

</form>





Does anyone know why the search isn’t being run in Primo?



Any help is greatly appreciated!



Thank you,

Traci





[image002.jpg at 01D7901D]<https://www.btc.edu/>Traci Taylor, MLS

Lead Librarian

Bellingham Technical College<http://www.btc.edu/>

3028 Lindbergh Ave. | Bellingham, WA 98225

Phone: 360.752.8488 | Office: CC 327

Reference: Chat with a Librarian 24/7<https://askwa.libanswers.com/widget_chat.php?hash=bc35573cec49a83226b25e7a450c6e8c>



 BTC provides student-centered, high-quality professional technical education for today’s needs and tomorrow’s opportunities.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ctc.edu/pipermail/wactclc-primo_lists.ctc.edu/attachments/20220802/5cf1680d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2989 bytes
Desc: image001.jpg
URL: <http://lists.ctc.edu/pipermail/wactclc-primo_lists.ctc.edu/attachments/20220802/5cf1680d/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 12730 bytes
Desc: image004.jpg
URL: <http://lists.ctc.edu/pipermail/wactclc-primo_lists.ctc.edu/attachments/20220802/5cf1680d/attachment-0001.jpg>


More information about the Wactclc-primo mailing list