//SUBMIT BUTTON
$w.onReady(function () {
$w("#dataset1").onReady(function () {
$w("#submitButton1").onClick(() => {
$w('#bookingMultiStateBox').changeState("bookingCTA");
$w("#submitButton1").label = "Please wait..."
$w("#submitButton1").disable();
});
$w("#dataset1").onAfterSave(function () {
$w("#submitButton1").label = "Submit";
$w("#submitButton1").enable();
$w("#bookingMultiStateBox").changeState("bookingCTA");
$w("#anchor1").scrollTo();
});
$w("#dataset1").onError(()=> {
$w("#submitButton1").label = "Submit";
$w("#submitButton1").enable();
});
});
});
Now it still depends, if you are doing it only by code, or if you also using the PROPERTY-PANEL.
Your SUBMIT-BUTTON is connected with the dataset, or by CODE only ?
- If by code only —> setFieldValues() + save() missing
- If using PROPERTY-PANEL-CONNECTION → onAfterSave() will be activated.