How to create form that autofill order number

Hi
I am currently using code to help autofill the custom form with user’s email address
I hope to get some help on how to do the same with Order Number for the form to auto fill user’s current order number
This is the code I found and used for email autofill , I am clueless on how to adapt it
I will so much appreciate your help :grinning:

Unfortunately, you need to copy and paste the code in the post. It is really hard to help you this way.