My Goal is that the entered plz code of the user is stored locally, so we can do the search for the shops in our Database, without entering the plz code again.
Step “Search in Database” import wixData from “wix-data”
export function ipostakodu_keyPress(event, $w) {
filter($w(“#ipostakodu”).value);
} function filter(postakodu) {
$w(“#dataset1”).setFilter(wixData.filter().contains(“plz”, postakodu));
}
Step “Storage PLZ Code” import { local } from ‘wix-storage’;
local.setItem(“#ipostakodu”);
let value = local.getItem(“#ipostakodu”); // “value”
With the code, you need to have the users search user input saved into Wix Storage first using the setItem function, then you need to run the setFilter on the appropriate dataset with the value in storage by calling it through the getItem function.