• A new version of Full Calendar is now available.

    See the details here

How to not trigger the loading spinner in form

mirceat

Member
Hello,

I'm using the following code to toggle a textfield in form. Works fine if the loading spinner is disabled in form, but if it's enabled then every time I click on "Add street name" button the spinner is triggered like the form is trying to submit information.

I need to keep the loading spinner enabled to prevent multiple submits but also need to use this code. How can I do it? Thank you

JavaScript:
jQuery(document).ready(function() {

jQuery('.fb_el_contracts_tool_servicii_830_repeat___nume_strada_bis').hide();

jQuery( "<button id='addButton'>Add street name</button>" ).insertAfter( "#contracts_tool_servicii_830_repeat___nume_strada" );

jQuery('#addButton').click(function() {

jQuery('.fb_el_contracts_tool_servicii_830_repeat___nume_strada_bis').toggle();
});

});
 
Last edited:
seems to be solve it using preventDefault in function:

jQuery('#addButton').click(function(spinner) {
spinner.preventDefault();
jQuery('.fb_el_contracts_tool_servicii_830_repeat___nume_strada_bis').toggle();
});
 
Last edited:
Back
Top