Email not being inserted into request

okay so right now i have a form where users enter their information and get ready to check out. Once the user hit place order the code is supposed to grab the email and insert it into the post request to the stripe server… the problem im having right now is that when i try

let email = $w("#emailInput").value;

it should take that email and send it with the rest of the information to the server. But it is returning null when i check stripe and when i see the post request it shows that for the email it is submitting “” and not inserting the email the user enters. when i tried

let email = "$w("#emailInput").value";

it just sends “$w(”#emailInput").value" as the email. I have tested this

  let email = "myemail@test.com"

and this does return that email in the result so i know the rest of the code works fine… Can someone explain to me why when i set email equal to $w(“#emailInput”).value; why does it submit nothing and show as null. Thanks and sorry if this might sound a little confusing.

Hi,
Can you please share with us the function code and not a specific line?
Moreover, please send us the site URL so that we can have a look.

Thanks,
Tal.

…(face palm ) so i was reading the API reference to see if i could find what caused this and sure enough it was due to the email field being collapsed… I fixed this by instead of collapsing the field i just hide it… Thanks

Hi Mason,
Can you send your Page code or HTML code of how you hide the email field? I am having the same problem. Thanks!