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.
Click the pencil icon of the Salesforce Lookup field. Set “Object” and “Display additional Fields”. Save the changes.
Click the pencil icon of the Salesforce Prefill field. Set “Object”, “Formyoula Parent Field” and “Salesforce Parent Field” as shown below.
Map the Form field to the Object field. Save the changes.
Click the pencil icon of the JavaScript field and paste the code. Save the changes.
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.
For any questions, please contact us - [email protected] or the Formyoula in-app chat 🙂