Why my code not work in version 3
-
Hello,
I write function in Ninja Forms v2 and when update to Ninja Forms v3 my function not working.This is my code:
function haet_prepopulate_forms($data) { if($data['label']=='My_label_name') { $terms = get_terms('my_taxonomy', array('hide_empty' => false)); $data['list']['options']=array(); foreach ( $terms as $term ) { $data['list']['options'][] = array( 'label' => $term->name, 'value' => null, 'calc' => null, 'selected' => 0 ); } wp_reset_postdata(); } return $data; } add_filter('ninja_forms_field','haet_prepopulate_forms');Whats wrong?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Why my code not work in version 3’ is closed to new replies.