Because I’m a designer, I don’t know anything about how to code.
I just searched and just did it. I would like to copy this value to another page, but I don’t know how.
I already looked up this and tried some code, but it didn’t work at all.
Really need help /:
To transfer items from PAGE-A to PAGE-B, you will need to use either a DATABASE, or the Wix-Storage-Api, which gives you the wished function.
I’ve tried this several times, but I couldn’t figure it out.
I’m a beginner, so it’s really hard /:
I would study and try if someone helps me.
I’m not sure in what order I should arrange the code …
PAGE-A-CODE:
import {local} from 'wix-storage';
$w.onReady(()=>{
$w('#dynamicDataset').onReady(()=>{
let currentItem = $w('#dynamicDataset').getCurrentItem();
console.log("Current-Item-Data: ", currentItem);
let transferData = JSON.stringify(currentItem);
local.setItem("DATA", transferData);
});
});
Try to understand what’s happening here and create the code for SITE-B, where you want to recieve the DATA from PAGE-A.
PAGE-B-CODE:
Start your coding for page-B. As example you already have PAGE-A-CODE.
This is just a quick example, created within 5-min and not tested.
So maybe you will have to optimize or modify it a little bit.
Good luck!
Thank you!