Jump to content

Custom search that Includes any of enetered texts


Recommended Posts

If you send some words separated with OR like : John OR Mike and then in your report page receive this value and comparison type should be CONTAINS

You need to separate your search and report in two page: https://howto.caspio.com/tech-tips-and-articles/tech-parameters/how-to-separate-search-page-and-results-page-into-two-different-webpages/

Then in the search page add a JS to the Footer of the page to replace the spaces you have on search field with OR.

<script>
function rep(){
var str= document.getElementById('cbParamVirtual1').value;

document.getElementById('cbParamVirtual1').value =str.replace (/ /g, ' OR ');
}

document.getElementById('Submit').onmouseover = rep;

</script>

Virtual 1 if the virtual field you added to your search page and you need to check the value to the next page on submit.

Link to comment
Share on other sites

  • 5 months later...

Pardon the thread necromancy but my Q is similar to this one so I thought I would share it here.

We have separate fields in our profile table for first name and last name.

Currently have a "one ring to rule them all" search bar that is supposed to search all given fields in that table for any keyword entered.  The fields we are using are firstname, lastname, FULLname (a concatenated entry derived from first, middle and last), category and keywords.  So a person can enter "John" for example and get all profiles with the name John in them -- including e.g. last name Johnson.

Problem is, if they enter a full name, such as John Smith, it returns NO results -- even if there are four people surnamed Smith, or three people named John.

http://go.pacific.edu/findanexpert -- that's the live; if someone could assist with this it would be most appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...