I’ll have a go at getting my head round using the onaftersave and see if I have any luck
To help you to solve this issue…
$w.onReady(()=>{
$w('#dataset1').onReady(()=>{
//all other normal dataset-code here....
//all other normal dataset-code here....
//all other normal dataset-code here....
//all other normal dataset-code here....
//all other normal dataset-code here....
});
$w('#dataset1').onBeforeSave(()=>{
//after-save-code here...
//after-save-code here...
});
$w('#dataset1').onAfterSave(()=>{
//before-save code here...
//before-save code here...
});
});
All you have to do right now —> is to find out, where to put in which code-part.
- 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();
- refresh(); —> will refresh your dataset to refresh the visualisation of your repeater or a table (which is surely connected to your dataset, at least in most of cases).
- And we do not forget about the → HINT <— with the —> TIME-DELAY <—
setTimeOut(()=>{................},1000);