pico の survey プラグインで遊ぼう!の picoSurveyAssistant を書いていて気づいたんですが、pico の formmail プラグインで、checkbox や radio が複数あるフォームの場合、最初の要素の legend が、以降すべての checkbox と radio のタイトルとして、メールで送られているようでした。
で、/trust_path/modules/pico/class/FormProcessByHtml.class.php の 132 行目あたりをチェックしてみました。
// search the nearest <regend> for radio/checkbox
if( preg_match( '#<fieldset.*'.preg_quote($tag).'.*</fieldset>#isU' , $form_html , $regs ) ) {
if( preg_match( '#<legend[^>]*>([^<]+)</legend>#' , $regs[0] , $sub_regs ) ) {
$label = strip_tags( @$sub_regs[1] ) ;
}
}
これを下記のようにしてみたところ、目的の legend の値が、タイトルになって送られたように思われます。
#あっ、コメントにも typo が…… ^^;
// search the nearest <legend> for radio/checkbox
if( preg_match( '#<fieldset.*'.preg_quote($tag).'.*</fieldset>#isU' , $form_html , $regs ) ) {
if( preg_match_all( '#<legend[^>]*>([^<]+)</legend>#' , $regs[0] , $sub_regs ) ) {
$sub_regs_tmp = isset( $sub_regs[1] ) ? array_pop( $sub_regs[1] ) : '' ;
$label = strip_tags( $sub_regs_tmp ) ;
}
}
これが最良の措置かどうかわからないのですが、ご報告まで〜。