You don’t have to use Wix-Data at all.
You have already your DATASET-connected to your databse.
So write your code, to tell your dataset to save items inside the DATABASE, which is connected to your dataset.
You are using the same DATABSE
$w('#bagnallLatest').onReady(()=>{
wixData.insert('Bagnall',formData).then(()=>{
Kick out → Wix-Data-API-CODE ← of your project and replace it with CODE → related to DATASET-CODING —> using …
- add() —> will add a new line inside your database which is connected with your dataset
- setFieldValues() —> will define which FIELD-DATA you want to be saved.
- save(); will save your data into database with the help of DATASET
- onAfterSave(); will start the on AFTER-SAVE event, fired after saving process. Here you will define what to do after saving-process has been done.
As i know DATASET → it could give you anyway an ERROR, something like…
“CAN NOT REFRESH DURING SAVING-PROCESS”
You can RESOLVE THIS ISSUE BY putting some little → TIME-DELAY <— inside of the —> onAfterSave()-Code-Part.