I’m building an order form that collects a lot of information, but after the user successfully completes the form, I want to upload files via email. To keep things similar to safe, I want the emails to go to a separate “safe” email. From what I can tell, this needs to be a new form on a new page. I’m considering using the thank-you return page to upload files. Is there a way to pass data, such as name and email, collected on the first page to the second page in Sitely? This is pretty easy with PHP dropping cookies, but I’m not sure how to implement it within Sitely.
This isn’t possible without adding some extra code, but you’re right, it can be done using PHP. However, storing this kind of information in cookies isn’t considered best practice. It would be better to store it in the PHP session instead. Sessions are handled directly by your server and will work even if your visitor blocks cookies.
I think the simplest way to achieve this would be:
On the main form page : Add a script that captures the “Name” and “Email” fields (as soon as they are filled out, even before the form is submitted) and stores them in the session data.
On the secondary form page : Add a script that retrieves the stored session data and inserts it into text input fields that will be submitted along with the uploaded files. These input fields can be hidden from the user.
If you know the basics of development, AI will be your friend! Or feel free to send me a DM if you need help
PS: I just remembered the limitations of using PHP sessions on a page, it’s not as straightforward as I mentioned earlier. Instead, you should use the “sessionStorage” method. It doesn’t rely on PHP, but the approach remains the same as the one I explained earlier.