Parsing text to a text form field...

Hi,

Do anyone know how to parse text from a regular textbox located on a dynamic page into a text input field in a Wix form located on annother page…by clicking on a buttom on the dynamic page?

Thanks in advance
Ulf

You can use wix-storage to save the data on one page, and then to retrieve it on the target page.

Thanks…I know - and I can also get it to work if I parse the text into a regular textbox in the target page - but what I want, is to parse it into a text input field located in a Wix form on the taget page and that I can not get to work.

I use this code in Page1:

import wixLocation from “wix-location”;
import {session} from ‘wix-storage’;

export function Submit_click(event, $w) {
session.setItem(‘title’, $w(‘#title’).text);
wixLocation.to(“/page2”);
}

and this code in Page2:

import {session} from ‘wix-storage’;

$w.onReady( function () {
const productTitle = session.getItem(‘title’);

$w(‘#productTitle’).text = productTitle;
});

The code in Page2 gives me an error in line 13 (please see the enclosed screendumb).

You can see my test pages online here: https://www.umanart.dk/page1

Thanks
/Ulf