Yes, you are using wix-data, but on the frontend. There’s no point in defining a projection there, a savvy user could guess the name of other fields(columns) and add them to the query. How I do it is like this:
- write a backend function, lets say getData(strEmail, someOtherValue). I do not know what $w( " #input1 " ).value) holds.
- you cannot call backend function directly from frontend. You need to go thru a .jsw file. So create a .jsw file and create a shadow function there called getDataJSW(strEmail, someOtherValue), which simply calls the first backend function.
- in the backend function, you do the query, filter the result (look at Sam’s article), return it so the .JSW file
- .JSW-file returns it to frontend
- Bob’s your uncle
EDIT: and on the frontend, you just call the getDataJSW(…), wait for the result and then display it.