checkbox服务one_label_element "DJ“"Live Dhol”"MC“”智能舞池照明“"Uplighting”"Pinspot“<
发布于 2021-01-18 16:29:58
使用Smart Grid extension for CF7,它引入了邮件标签过滤器,所以你可以这样做,
add_filter( 'cf7sg_mailtag_my-checkbox', 'filter_cf7_mailtag_my_checkbox', 10, 3);
function filter_cf7_mailtag_select_option($tag_replace, $submitted, $cf7_key){
/*the $tag_replace string to change*/
/*the $submitted an array containing all submitted fields*/
/*the $cf7_key is a unique string key to identify your form, which you can find in your form table in the dashboard.*/
if('my-form'==$cf7_key ){
$tag_replace = '<ul>'.PHP_EOL;
foreach($submitted['my-checkbox'] as $value){
$tag_replace .= "<li>{$value}</li>".PHP_EOL;
}
$tag_replace .= '</ul>';
}
return $tag_replace;
}过滤器是为每个邮件标签定制的,在本例中,我有一个名为my-checkbox的复选框字段,插件创建自定义过滤器和助手代码。请查看此video tutorial以了解如何获取适当的筛选器。
https://stackoverflow.com/questions/65692095
复制相似问题