Closed GuillaumeOcculy closed 2 years ago
Hi @GuillaumeOcculy,
This is what you can achieve with some JS.
const uploader = uploadcare.Widget("[role=uploadcare-uploader]");
const form = document.getElementById("your-form-identifier");
uploader.onUploadComplete(function () {
form.submit();
});
Instead of submitting the form right away after a click on the Add button, it's better to wait until all files are uploaded. If you still want to submit the form immediately, replace the onUploadComplete
method with onChange
.
Thanks 🙏
rails (7.0.2.3)
uploadcare-rails (2.1.0)
importmap-rails (1.0.1)
Is there a way to submit the form after clicked on "add" button ?
Right now I have to click on "add" and then click on my
:submit
buttonhttps://user-images.githubusercontent.com/3475334/165186709-1c6468f7-2c37-4971-9fbf-6f73d5d986a9.mp4