Show/hide images when a form is submitted.

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.

  1. add() —> will add a new line inside your database which is connected with your dataset
  2. setFieldValues() —> will define which FIELD-DATA you want to be saved.
  3. save();
  4. 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).
  5. And we do not forget about the → HINT <— with the —> TIME-DELAY <—
setTimeOut(()=>{................},1000);