79717028

Date: 2025-07-28 08:15:32
Score: 0.5
Natty:
Report link

I used a different way,

<script>
jQuery(document).ready(function($){
  let productName = '';
  
  $(document).on('click', '.elementor-button-link', function() {
    productName = $(this).closest('[data-product-name]').data('product-name');
  });

  $(document).on('elementor/popup/show', function() {
    if (productName) {
      $('#form-field-product_name').val(productName);
    }
  });
});

</script>

then in the button in loop, Advanced Tab (not the link one) > Attributes > click on the dynamic tags gear icon > select product or post title > after you selected it click on the wrench icon > in before field add (data-product-name|). in the form make field ID (product_name).

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Ali