Adding a site search to wix.

I am trying to add a site search to wix site. The search is to extract and display data from three fields in that dataset based on a search criteria such as discipline and all other field data is to remain hidden. The search app currently would pull all data in the dataset. I would appreciate any help.

Thanks

1 Like

Can you be a bit more clear? I read two different things:

  1. you are search via one or more field through the data
  2. you only want three columns returned from the dataset

Number 2 is interesting, this is security related. Standard WIX returns all columns, even if you won’t use them. Well that is what I saw. On my site I do a query on the backend, then transform the result to specifc columns only and that is passed to the frontend. So I don’t have a dataset on the page, but do have a repeater. Do you mean something like this?

You are correct. The problem I have is that all fields are returned and for security I do not want this to happen. I want only some select fields displayed. So is there a way to hide or filter out some fields during the display? I am searching for an app./custom that can do this on wix. I don’t know if the site would accept custom search apps to do this on the dataset.

for instance I have a dataset called mentors with 9 fields and would want my search to pull records from 4 fields named lastname, firstname, email and photo leaving out other fields like address etc.

Ah. Exactly what I’ve done. (nearly) let me explain.

My site is multilingual. I did it the ‘dirty way’, namely a column description_nl and description_en in my database (and others simular). I don’t want that in my repeater, I only want ‘description’ based on the selected language. So what I did is make a backend function which queries the dataset. Based on the language I transform description_en to description. Also, since I have the option, I’m not returning anything except what I want. This backend function excepts a couple of parameters like language (you can’t access client session info of course from the backend) and filter info. When I check a checkbox on my site, the same function client function is called as on page load, only with the new filter. That calls the backend which the returns new data.

I don’t work with a dataset this way, the result is returned into the repeater.

Are you familiar with javascript programming and / or wix-code as in the api documents? Then I can write it up, otherwise I’ld be happy to help out.

Hi Edgar,
I will appreciate any help. I am not familiar with javascript or wix-code.
Thanks