dhayes22 Posted June 12, 2020 Share Posted June 12, 2020 (edited) Hey everybody, Trying to figure out a way to avoid a 3rd party form to include file upload. I injected HTML into the form, and it looks great. However, after submission, the data isn't included in the form storage locations (email and google drive). I assume the reason that doesn't work is because the form is given a unique id upon creation and that id is what is used to transmit data, making the JS injected AFTER the creation of the form invisible in the data transfer. Any ideas on how to get around this? Here's the code I've injected into the footer: <script> // If on order-form-page, inject file upload element if (document.URL.includes('/order-form-test')) { document.querySelector('#textarea-yui_3_17_2_1_1572443434525_3770').insertAdjacentHTML('afterend', '<h3>Please Upload Artwork Here</h3><input type="file" id="myFile"><br><br>'); document.querySelector("#myFile").setAttribute("accept", ".doc,.jpg,.png,.jpeg,.docx,.pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"); }; </script> Edited June 12, 2020 by dhayes22 Link to comment
Beyondspace Posted June 16, 2020 Share Posted June 16, 2020 Please provide the site url that you have activated the code Thanks dhayes22 Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment