Session Storage Key Name

I have a contact form and I want to store the user’s email address in session storage so it can be retreived from the thank you page.

https://yelluk.wixsite.com/my-site-29432/

This is the code I am using:

import {session} from 'wix-storage';

export function wixForms1_wixFormSubmitted() {
session.setItem('yourEmailVariable', $w("#input1").value);
}

It works in that it stores a value, however the key name is incorrect (appears to be generated) and it is storing the key name and value together as an array in the value field:

I expected it to output the following results:
Key: yourEmailVariable
Value: test@test.com

Any help would be appreciated!

I took a look at your site and while you did remove the onReady function which is not advised, replacing this did not fix the issue. I suggest opening a bug report with customer care for further investigation

It seems that the session storage key is being automatically generated, and the value is being stored as an array.

import {session} from 'wix-storage';

export function wixForms1_wixFormSubmitted() {
    const email = $w("#input1").value;
    session.setItem('yourEmailVariable', email);
}