Prefilled form input fields fill then go blank

Is the Submit button still connected?

No, nothing is connected

Please send us the website (page) URL, we can’t predict what’s going on only by the error message.

What I think that happened, is that one of the upload files failed to upload causing the saving process to be rejected.

I need your site URL to see how you implemented the code, and if you did it correctly.

Don’t put your email and password! Delete them immediately and change your password.

The issue is that the resume field in your form is not an " upload button ", that’s why the upload process failed and reject the saving process, you need to delete it from the elements array in the uploadFiles() function and edit its value from the onBeforeSave() function to be the field value.

I’ll edit my answer as well.

NOTE : Nice website by the way :wink:

Thank you for all the help. You have been an absolute star with all the time you have spent on this.

Also thanks so much, it’s the first site I’ve ever fully coded so it’s been a bit of a challenge :sweat_smile:

From the live site the upload buttons seem to be uploading but the console is returning this error:

  1. code : “DS_OPERATION_CANCELLED”

  2. Symbol(error was handled) : true

  3. Symbol(error-boundary-scope) : “userCodeZone”

  4. message : “Operation cancelled by user code. TypeError: i(…).then is not a function”

  5. name : “DatasetError”

  6. stack : “DatasetError: Operation cancelled by user code. TypeError: i(…).then is not a function↵ at eval (https://static.parastorage.com/services/dbsm-viewer-app/1.1131.0/app.js:6:169078)”

  7. proto : t

Can you comment the sendFormData() ; function call temporarily from the onAfterSave() function and the function itself and try again?

I have removed all the sendForm js entirely just to be sure, run the code and I’m still getting the same error as above.

In this part, add an await term:

await $w(elementId).startUpload().then((uploadedFile) => {
            fileUploaded++
            elements[i].url = uploadedFile.url;})
.catch((uploadError) => {
            console.error(uploadError.errorDescription, uploadError.errorCode);
            return false;
})

And change the uploadFiles() function to an async one:

async function uploadFiles() {
    
}

Publish the website and see if error is gone.
I believe this will solve it.

Almost, it submits to the database now and runs the onAfterSave but the entry is blank.

Can you show screenshots of the database?

Also, please add the following code to the save() function that you run on the dataset.

$w("#dbApplicants").save().then( (item) => {
    console.log(item); // Screenshot the result of this
}).catch( (err) => {
    console.error(err);
    console.warn("Dataset operation save has failed!");
});

Okay this is what I get back…


And this is my database…

It looks like the uploadFiles() function is not returning any results, I don’t know why though :thinking: But it’s obvious that the result returned is undefined, this gonna need more investigations.

I want to consult Yisrael , but my account is messed up, I don’t get notifications and I can’t tag anyone, perhaps you can tag him or any of the Masters .

Is there a specific way to do that on here? I saw other people @ tagging but I can’t tag that way it seems

Maybe it’s a temporarily glitch on Wix Forums, I can’t tag people too, and I receive notifications after a lot of time if at all.

Should I start another conversation asking how to contact Masters and add the link to this thread perhaps? I am anxious for a solution for my client.

The only way to contact them is by tagging them, your post should be instead on why the function is not returning any result.

And provide a link to this post.

For questions that are not related to code (such as forum features) you can contact Wix Customer Care . You’ll get better help for your problem there.

Please note that according to the Corvid Community Guidelines , it’s not the proper etiquette to tag other for help.