Disable Clicks From Spinner UI

In this guide, we will explain how to disable clicks when the spinner is active.

Drag and drop a Salesforce Lookup, a Salesforce Prefill, a Text, an Email and a JavaScript field. Rename the Text and Email fields as shown below.

image

Click the pencil icon of the Salesforce Lookup field. Set “Object” and “Display additional Fields”. Save the changes.

image

Click the pencil icon of the Salesforce Prefill field. Set “Object”, “Formyoula Parent Field” and “Salesforce Parent Field” as shown below.

image

Map the Form field to the Object field. Save the changes.

image

Click the pencil icon of the JavaScript field and paste the code. Save the changes.

image

Please use the code below:

// Listen to spinner event
window.formyoula.event_on( 'main:spinner_dialog', function() {
  // Remove click events
  $( '.custom-loader' ).removeAttr( 'onclick' );
} );

Try the form. It will disable clicks when the spinner is active.

image

For any questions, please contact us - [email protected] or the Formyoula in-app chat 🙂