MW WP FORMのフィルタフックがうまくいかない
-
https://plugins.2inc.org/mw-wp-form/filter-hook/mwform_choices/
http://www.wp-tech.net/wordpress_tips/3477/
上記を参考に
こちらの mwform_choices_mw-wp-form-xxx をフォームに実装したのですが、functions.phpに下記を記載したものの、
全く無反応です。
データは入っているため、受け渡しがうまくいってないと思います。なにか記述に誤りがあるでしょうか?
よろしくお願いします。function SELECT_LOOP( $children, $atts ) { if ( $atts['name'] == 'sanka' ) { // 'test_select' には該当する要素のname属性 if( have_rows('satsuei_content','option') ) : // 'test_repeater' にはリピーターのフィールド名 while( have_rows('satsuei_content','option') ) : the_row(); $select = get_sub_field('satsuei_content_content','option'); // 'test_input' にはリピーター要素のサブフィールド名 $children[$select] = $select; endwhile; endif; } return $children; } add_filter( 'mwform_choices_mw-wp-form-19', 'SELECT_LOOP', 10, 2 ); // '2554' にはフォームID
2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
- トピック「MW WP FORMのフィルタフックがうまくいかない」には新たに返信することはできません。