Transfer one data input to another page

Hi

I need help here please. Basically I want to transfer one data input to another page. As for an example, let’s say this particular user is inputting an amount on Page A, I want to display the same amount in Page B.

To be more precise let’s say this person enters $600 in page A and then I want this $600 to be brought forward to another page. I don’t this user to enter the same data twice in Page A and B. It will be easier for them if the amount is displayed in Page B.

Please help me through this. Thank you.

You can use wixStorage to keep the data in the browser cache/memory and use it in the other page:
https://www.wix.com/corvid/reference/wix-storage.html

Thank you very much for the help but still I have few confusions and I hope it is okay to clarify.

For setting a session i used :

import {session} from ‘wix-storage’;
// …
session.setItem(“#input4”, “value”);

And to retrieve I used :
import {session} from ‘wix-storage’;
// …
let value = session.getItem(“#input4”); // “#input1

May I know what I am doing wrong because I want the same “user input” to be displayed in page B as page A. Example in page B #input4 I want to place it in page B’s #input1 .

Thank you.

@testsalesmimota
PAGE 1:

import {session} from 'wix-storage';
$w.onReady(() => {
    $w('#input4').onChange(event => {
            session.setItem('value', $w('#input4').value);
    })
})

PAGE 2:

import {session} from 'wix-storage';
$w.onReady(() => {
    let value = session.getItem('value');
    if (typeof value === 'string'){
        $w('#input1').value = value;
    }
})

@jonatandor35 Thank you very much. It worked!

@testsalesmimota you’re welcome :slight_smile:

@jonatandor35 Sorry to trouble you again I have opened a new forum regarding If Else Statements or Switch Statements.

https://www.wix.com/corvid/forum/community-discussion/if-else-for-calculations

Try to give a look and try help to resolve this issue. Or if there is anyone I can refer to. Do show me to the right way.

Thanks again.

I trieid doing this for date transfer but it wouldn’t work.
e.g. The user chooses the date from a date box and when transfered to another page he should see the date he chose before.
Any help? :stuck_out_tongue:

i have same problem too.