Hi guy's, i would like to put an upload button on my webside like that the use's can put they CV to send to us.
Sorry for my english :/
Thx
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
I’m having the same issue. Would you be able to help me? I’m trying to allow my customers to upload images for their custom orders . I need the buttons on the product page. I had the same issue with the JavaScript
Hello! I was wondering how I would be able use this form to send an email with the attached file?I would really appreciate some help as I am quite new to this haha
ok, thank you :-)
i will try again
Amir
You need more than just a button. You need all of the components that are used in the Javascript code, and the components must have the IDs that are used in the code.
But i have put a button outside the contact form. The Blue button
The code will not work with a Contact Form component. You need a page that has all of the components as you listed above. You will need to carefully follow the article How to Use the Upload Button with Code in order to properly build the form.
But don't publish the webside :)
Contact page
What page?
https://editor.wix.com/html/editor/web/renderer/edit/3fc943cf-e262-4e8d-98fb-e236b1530154?metaSiteId=83f2ca37-bdbb-44fa-924c-37e74401bbe9&editorSessionId=1CF7FCB9-C476-460C-A5F3-EE7AEF916CE5&referralInfo=my-account
go to Contact page
Please post the URL of your site. Only authorized Wix personnel can get access to your site in the editor.
I have no different name :
Sorry but i don't know JS
You need components with those IDs on your web page. The error is telling you that those components are missing, or have different names.
I have try and when i put this JS Code :
export function button1_click_1(event, $w) { //Add your code for this event here: if($w("#uploadButton1").value.length > 0) { $w("#text1").text = `Uploading ${$w("#uploadButton1").value[0].name}`; $w("#uploadButton1").startUpload() .then( (uploadedFile) => { $w("#text1").text = "Upload successful"; $w("#image1").src = uploadedFile.url; }) .catch( (uploadError) => { $w("#text1").text = "File upload error"; console.log(`Error: ${uploadError.errorCode}`); console.log(uploadError.errorDescription); }); } else { $w("#text1").text = "Please choose a file to upload."; } }
they show me this error : is not a valid selector for :
("#uploadButton1") ("#text1") ("#uploadButton1") ("#uploadButton1") ("#text1") ("#image1") ("#text1") ("#text1")
I don't understand why
Ok, thank you, i will try. :D
Hey Amir,
Welcome to the Wix Code forums.
Take a look at the article How to Use the Upload Button with Code. This will show you what you need.
Have fun,
Yisrael