• Payment Plugins Poll

    We need your feedback on the need for updated payment plugins. Please go here and give us your feedback.

  • Joomla 5.1

    For running J!5.1 you must install Fabrik 4.1
    See also Announcements

  • Subscription and download (Fabrik 4.1 for J!4.2+ and J!5.1) are working now

    See Announcement
    Please post subscription questions and issues here

    We have resolved the issue with the J! updater and this will be fixed in the next release.

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