Как заполнить поле формы Elementor во всплывающем окне с заголовком спойлера ⇐ Jquery
Как заполнить поле формы Elementor во всплывающем окне с заголовком спойлера
I have spoiler I want to send title of the item I click on it, the content has button that opens the popup with the form. I can get the title with jQuery, but I can't populate the input with the value. this code is getting the value and populate the input
var job_title = ""; jQuery('.careers_toggle h2.elementor-tab-title .elementor-toggle-title').click(function(){ title = jQuery(this).text(); title = jQuery.trim(title); job_title = title; jQuery('#job_title').val(job_title); }); jQuery('#form-field-first_name').on( "focus", function(){ jQuery('#job_title').val(job_title); }); job_title is the ID of the input, but none of the options is setting the value. How do I set the value? I did it with Contact form 7 and other popup plugin, but I don't want to add more plugins
Источник: https://stackoverflow.com/questions/781 ... iler-title
I have spoiler I want to send title of the item I click on it, the content has button that opens the popup with the form. I can get the title with jQuery, but I can't populate the input with the value. this code is getting the value and populate the input
var job_title = ""; jQuery('.careers_toggle h2.elementor-tab-title .elementor-toggle-title').click(function(){ title = jQuery(this).text(); title = jQuery.trim(title); job_title = title; jQuery('#job_title').val(job_title); }); jQuery('#form-field-first_name').on( "focus", function(){ jQuery('#job_title').val(job_title); }); job_title is the ID of the input, but none of the options is setting the value. How do I set the value? I did it with Contact form 7 and other popup plugin, but I don't want to add more plugins
Источник: https://stackoverflow.com/questions/781 ... iler-title
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение