## javascript – CCF7 Field numbuer prefilled after Click event

Question

Good morning, I created a script to capture dynamic data on my page and pre-fill the form CF7

 function reply_click(element)
{
document.getElementById('offerta_prezzo').value = element.getAttribute('data-prezzo');

}


with the link that is formed

<a href="#contact" class="pbutton" onclick="reply_click(this)" data-prezzo="[ptb_field name="prezzo1"]">[ptb_field name="prezzo1"]</a>


this works perfectly with the text fields

I would like to understand why it does not also work with the number field (I will need this to create formulas to define the price)

0
4 weeks 2023-03-08T10:25:35-05:00 0 Answers 0 views 0