Dear Community,
I'm trying to display a preloader while the form is being submitted. The preloader should appear when the submit button is clicked until the form submit is successful.
It shouldn't display if the form submission shows an error.
I've tried two approaches with limited success. Guidance from the community would be much appreciated. Thank you
Version 1:
export function button1_click(event) { //Add your code for this event here: if (("#formError").isVisible) { $w("#box1").hide(); } else{ $w("#box1").show("SlideIn"); } } Version 2:
export function button_click(event, $w) {
$w("#box1").show();
$w("#producerRegistration").onAfterSave( () => {
$w("#box1").hide(); });
$w("#producerRegistration").onError( () => {
$w("#box1").hide(); });