Jump to content

Remove search page/Disable ''enter'' function

Recommended Posts

Site URL: https://caper-badger-3s6d.squarespace.com/blog/lyrics

Password: home

If I (accidentally) press ''enter'' in the search field, a new seach page appears. Is it possible to remove the link to this page and disable ''enter'' function on search?

I tried this code from @tuanphan, but it didn't work. Can anyone help me remove search page/disable enter function?

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$("form").keypress(function(e) {
  //Enter key
  if (e.which == 13) {
    return false;
  }
});
</script>

2046099934_Searchpage.thumb.png.af239b6cde362ae1b80210d99a0c7af2.png

Link to comment
  • Replies 6
  • Views 413
  • Created
  • Last Reply
  • 2 weeks later...
  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.