Hi @rymanacevedo,
I’ve not identified exactly the reason why your function is called twice when the form include multiple pages, because your current form has only one page and the issue is not occurring, however I’ve some recommendations.
First, You have included in the custom code two events “document ready”:
jQuery(document).ready....
and
jQuery(function(){....
I recommend in this case to use an event triggered by the plugin,
fbuilderjQuery(document).one('showHideDepEvent', function(){
var $=fbuilderjQuery;
/**** Insert the rest of your code here, using the $ symbol as a reference to jQuery ****/
});
That is, remove the couple of document ready events, and to include all your custom code as a replacement of the line of text:
/**** The rest of code here using the $ symbol as a reference to jQuery ****/
and using the $ symbol as a reference to the jQuery instance used by the plugin.
Second, as the pluging reduces the code to only one line, please, don’t use the format of single line comments for commenting the code, use the format of multiple lines even if it is only one.
// Please, don't use double slash
/* use this format */
If after modify your code the issue persists, please, clone your form, insert a page break in the cloned form, and send me the URL to the webpage where the new form was inserted for checking the issue in action.
Best regards.