There is a wordpress website with the contact form 7 plugin installed. I add inside the form (it is in the pop-up window)

 <input type="hidden" name="title-methodic" value="" class="wpcf7-form-control wpcf7-hidden hide-title" id="hide-title"> 

and this is what I noticed: if you access the hidden element via id , then the value in val is not recorded, and if in the class , it is recorded.

 $(document).on('click', '#button', function() { title = $(this).attr('data-title'); $('.hide-title').val(title); //работает $('#hide-title').val(title); //не работает }); 

Why is this so? Feature jquery , contact form 7 , pop-up window or some other functional?

  • 3
    Check if there is any duplication on the tags page with id = "hide-title" - Ofer
  • @Ofer yes, got it. I have several blocks causing the same form. Closed question - Vasya

0