1) How to add member detail for the form submission.

I want to save the action by whom members, what should I do.

First you should ask yourself…

Do i really want to learn coding?
Am i able to generate the wished function?

If so, do i use a DATASET?
Is my DATASET a DYNAMIC one or a NON-DYNAMIC one?
Do i use the wix-properties-panel, or do i want to code everything by my own, to get custom made functionality?

Or do i use the Wix-Data-API for my purposes?

Do i know the VELO-API ?
Do i know where to find the Velo-API-Docs?
Should i take a look onto the Velo-API-Docs?
Is there perhaps an already prepared code-snipet for me? (maybe, lets have a look!)

Would i understand what is written inside the Velo-API-Docs?

Damn, am i already confused and overstressed?
Should i better engage a real professional?

Nope! I want to learn for about 2-4-years, because i want to become a wix-programmer based on JS-programming.

And this would be just your beginning adventure if you don’t know anything about JS-Coding inside the Wix-Velo-Environment.

I have some coding knowledge on Node.js, however, some of the coding would not work.

I try to import wix-members-backend, but the import statement is invalid.

import { authentication } from ‘wix-members-backend’ ;

Cannot find module ‘wix-members-backend’ or its corresponding type declarations

Where did you implement this import?

  1. Front-end-code
  2. Backend-end-code

Thanks for your reply.
The coding I added is just below the page, so it is Front-end coding.
I tried to adding the backend code to front end, so it is failed.

At front end , adding the api without backend.
At the backend, adding the api with backend suffix.

  1. I won’t mind coding as long as I could get my expected function.

  2. I use multiple dataset.

  3. I still not sure what is the difference that dynamic one or a non-dynamic one.
    a) I would have a dataset to storing the contents that I would like to show by users searching criteria.
    b) I could open a new dataset to store the users input on to the form by clicking on the submit button. However, sometimes the required field without value and result error when I clicked on the search button.

However , I could not add the username by using the linking of the submit button and the dataset.

Thanks for your advice, I would look for the Velo-API-Docs.

Many thanks.

Back-end-code can only run on BACK-END
Front-End-Code can only run at FRONT-END.

You can not do a backend-import on front-end.
The same, you can’t do a front-end-import at backend.

Also you can not use → $w on Backend.
You will recognize BACK-END-CODES immediately → they won’t have any → $w

You will have to generate a communication between backend & frontend → using for example DATA-OBJECT-PACKAGES.

  1. Send your data from frontend to backend
  2. Do what ever you want on backend with your data
  3. Send result back to frontend
  4. Put results into all your wished elements ($w)

I won’t mind coding as long as I could get my expected function

I LIKE THAT STATEMENT!!! (REAL CODER-GENES) ??? NICE !!!

  1. I use multiple dataset.

  2. I still not sure what is the difference that dynamic one or a non-dynamic
    So if you are a real coder → why not working completely without datasets (generating everything only with CODE) ???

Then also you never would ask this question ever again…

  1. I still not sure what is the difference that dynamic one or a non-dynamic

Thanks for your advice, I would look for the Velo-API-Docs#
Yes, this is a good idea. There you will find predefined examples, which will help you to find your solution, if you know how to use the examples.

And next time also show your code, which you already have written.
Helping you without seeing your code, is like trying to shot down a flying bird with closed eyes!

I am a beginner for wix and velo-api.
If there is example that using dataset, to do it faster, using the dataset provided by wix.

Wix Members Backend is only used on the backend.

You need to export a function from the backend and call it in the front end.

You can also hire a developer from the Wix marketplace, an online marketplace with top Velo web developers from around the world. Submit your project details here , and we’ll find the right professional for you.

What is going wrong.

import wixData from "wix-data";
import {session} from 'wix-storage';
import wixLocation from 'wix-location';
import wixUsers from 'wix-users';


export async function btnSearch_click(event,$w) {

    
let lastFilterCountry=$w('#ddlCountry').value;
let productType=$w('#ddlProductType').value;
let productName=$w('#txtProductName').value;
let projectDate=$w('#datePickerProject').value;

let newHistory = {

    _id:wixUsers.currentUser.id,
    country:lastFilterCountry,
    productType: productType,
    productName:productName,
    projectDate:projectDate
    
}
    
    wixData.insert("History", newHistory);
    wixLocation.to("services/{Title}");

}

Why it result error ?
Fail to got users email address.