So you have any suggestions or ideas on the way to achieve this?
yes, there is a built in hook to achieve this.
add_filter('cf7sg_dynamic_checkbox_options_attributes','filter_post_attr', 10,4);
function filter_post_attr($attributes, $post, $tag, $cf7_key){
//$tag is a WPCF7_Tag object, $tag->name contains the field name.
//$post is the post object.
//get your price field values and put it into the $attributes array,
$price=...;
$attributes['data-price'] = $price;
return $attributes;
}
the filter is availabe when you,
1. click the php icon on your UI editor cell containing the dynamic field
2. select the filter from the list

Hi Vrata, first thank you for your super quick response.
The filter you mentioned first (cf7sg_dynamic_checkbox_options_attributes) did successfully added new attribute tag! 👍🏻
Unfortunately, I can’t seem to understand how to loop through your $post query in the filter and GET metadata value for each $post.
I’ll be happy If you could show a simple working code example of how to add for each $post “data-id=$post->post_id”
the filter is availabe when you
You should also know that I did tried to use the filter through the php icon filter list as you after described, but it doesn’t paste the right hook (cf7sg_dynamic_checkbox_options_attributes) but the hook: cf7sg_dynamic_list_options_attributes…
Waiting for your response,
Liran
Unfortunately, I can’t seem to understand how to…
My mistake, I used the wrong tag 🤦🏻♀️