Hello @cmgcomunicazione
Thank you very much for using our plugin. You can pass the product id directly through the query.
For example, assuming your product’s id is 123, you can use the tags structure similar to:
<label> Product Price [text price] </label>
[cf7-recordset id="product-price" type="database" query="SELECT meta_value as price FROM {wpdb.postmeta} WHERE meta_key='_price' AND post_id=123"]
[cf7-link-field recordset="product-price" field="price" value="price"]
If you want to insert the form into any product and get its id (product id), the tags structure above can be edited as follows:
<label> Product Price [text price] </label>
[cf7-recordset id="product-price" type="database" query="SELECT meta_value as price FROM {wpdb.postmeta} WHERE meta_key='_price' AND post_id={post.id}"]
[cf7-link-field recordset="product-price" field="price" value="price"]
Best regards.