@eugeniagarat
-You have different pages where you want to get data automaticaly from ?
a) saved options inside a database
b) saved options in (session/local/…)
Let’s say you have a switch, an options-button, or like in your case a radio-button (radio-button-group), where you can make your options-choice.
- option-A
- option-B
Like you already have recognized, your selected options get lost, every-time you change the page (what is absolutely normal).
So how could look like a solution for your problem ?
Using WIX-STORAGE…
Wix-Storage offers you 3-different types of MEMORY…
Decide on your own which one would fit your needs best.
Lets say, you are on PAGE-A and you do some option-change, by switching your radio-button-choice from VALUE-A to VALUE-B. For that moment your filter (or what ever engine) would work on your current selected page. But would stop working when you switch your page.
And here the MEMORY-FUNCTION comes into place…now we will save data into WIX-STORAGE…
https://www.wix.com/velo/reference/wix-storage
import {local} from 'wix-storage';
let mySelectedValue = "VALUE-B";
//saving data into wix-storage, using a special key....
local.setItem("key1", "value");
Now you have setted an value into the wix-storage.
WHAT NEXT ???
Let’s jump to PAGE-B !!!
What should now happen on PAGE-B ?
Yes, you want an AUTOMATIC change of your selected value, which already was done on PAGE-A —> (you selected VALUE-B), now on PAGE-B, you also should see VALUE-B.
But how ?
Let us load the value automaticaly inside onReady…
import {local} from 'wix-storage';
let myValue = local.getItem("key1"); console.log(myValue);
+onReady()…
import {local} from 'wix-storage';
$w.onReady(()=>{console.log("Page-B is ready now.....)
let myValue = local.getItem("key1"); console.log(myValue);
});
Now, you can use your new value, which you got from MEMORY (wix-storage) and use for what ever you want.
The same way, all this would work, with an additional separated OPTIONS-DATABASE.