My Account

Forums

Home Forums General Error form load twice

Viewing 8 reply threads
  • Author
    Posts
    • #82241
      Antonio Canas
      Participant

      I use javescript the event wsf-rendered, to show a array when load form, but this load twice and show duplicate content this is my url https://www.tailoredsuitparis.fr/produit/custom-suit-new/ , help me please

    • #82244
      Mark Westguard
      Keymaster

      I have responded to your support ticket. Thanks!

    • #82247
      Antonio Canas
      Participant

      hello in my email?

    • #82250
      Mark Westguard
      Keymaster

      You sent us a support ticket as well as this forum post. I have responded to the support ticket and you should have a response in your email.

      In short, you had two instances of the form on your page, hence you are getting two alerts showing from your JavaScript. Therefore you should use the instance_id parameter to single out the form you want your code to run for.

      Thanks

      Mark

    • #82252
      Antonio Canas
      Participant

      i do use the code and error no desapear

      $(document).on('wsf-rendered', function(e, form, form_id, instance_id) {
              // The form ID this script should run for
             var my_form_id = 8;
              // Do not run this JavaScript if this event does not belong to my form ID
              if(form_id != my_form_id) { return; }
      		   alert('c');
      		  // refreshNotes();
      
      		   
      		   
      
      	
             
          });
    • #82255
      Mark Westguard
      Keymaster

      You are responding on both the forum and the support ticket 🙂 I’ll respond to your support ticket.

    • #82256
      Antonio Canas
      Participant

      thank for your response, but, what is the instance of id? a class of the form, sorry for the inconvenience, thanks in advance

    • #82261
      Antonio Canas
      Participant

      Like this in the code?

       $(document).on('wsf-rendered', function(e, form, form_id, instance_id) {
              // The form ID this script should run for
             var my_form_id = 8;
              // Do not run this JavaScript if this event does not belong to my form ID
              if(form_id != my_form_id  || instance_id != my_form_id ) { return;  }
       alert('c');
      // refreshNotes();
    • #82285
      Antonio Canas
      Participant

      resolved thanks

Viewing 8 reply threads
  • You must be logged in to reply to this topic.

Login