soon as I leave the label field it is readded.
Readded? Not sure what you mean.
If you create a field and add text to a label and you delete the required html markup the label will appear without the asterisk sign.
If you don’t need the label you can insert “ ” character for a non breaking space.
This does not work for me, whatever I try, the asterisk comes back.
Here is a video to clarify:
https://www.youtube.com/watch?v=DyW3R7m3Ge8
this is only working for new forms?
Actually any new cell you create (new row or new column) will be affected by the filter once you reload the form edit page.
Existing fields/cells will not be changed.
Ah ok, I thought my filter wouldn`t work, but for new cells it does.
add_filter( 'cf7sg_required_cf7_field_html', 'filter_required_html', 10, 2);
function filter_required_html($html, $cf7_key){
//the $html string to change
//the $cf7_key is a unique string key to identify your form, which you can find in your form table i nthe dashboard.
if('kontaktformular-1'==$cf7_key ){
$html = '';
}
return $html;
}