Ajax live results not showing on second custom searchform
-
Hey there,
I have two search forms on my website; one is the main search and the other is a search for a specific category. The ajax live search is working great on the main search, however I keep getting this error on the second search despite having the same header, footer, scripts etc on the page – am I missing something?
Searchform 1:<form id="search" class="search-bar" role="search" method="get" action="<?php echo esc_url(home_url('/')); ?>">
<div class="wrap bar">
<input id="s" name="s" placeholder="Search research reports and papers..." class="searchtext required" type="search" value="" />
<input id="searchBtn" type="submit" value="Search" />
</div>
</form>Searchform 2:
<form id="search" class="search-bar" role="search" method="get" action="<?php echo esc_url(home_url('/')); ?>">
<div class="wrap bar">
<input id="s" name="s" placeholder="Search research reports and papers..." class="searchtext required" type="search" value="" />
<input type="hidden" value="251" name="cats" />
<input type="hidden" value="evidencebank" name="refine">
<input id="searchBtn" type="submit" value="Search" />
</div>
</form>Error message:
Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
at s.position_results (script.min.js?ver=2.5:1:7193)
at s.init (script.min.js?ver=2.5:1:1498)
at new s (script.min.js?ver=2.5:1:427)
at HTMLInputElement. (script.min.js?ver=2.5:1:9000)
at Function.each (jquery.min.js:2:3129)
at ce.fn.init.each (jquery.min.js:2:1594)
at jQuery.fn. as relevanssi_live_search
at HTMLDocument. (script.min.js?ver=2.5:1:9159)
at e (jquery.min.js:2:27028)
at t (jquery.min.js:2:27330)Thanks so much, you’ve built an amazing plugin.
- You must be logged in to reply to this topic.