Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
-1,
'post_type' => 'metform-form',
'post_status' => 'publish',
);
$forms = get_posts( $args );
foreach($forms as $form){
$form_list[$form->ID] = $form->post_title;
}
return $form_list;
}
protected function register_controls() {
$this->start_controls_section(
'content_section',
[
'label' => esc_html__( 'Content', 'metform' ),
'tab' => Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'mf_form_id',
[
'label' => esc_html__( 'Select Form : ', 'metform' ),
'type' => Controls_Manager::SELECT,
'default' => '',
'options' => $this->get_all_forms(),
]
);
$this->end_controls_section();
}
protected function render( $instance = [] ) {
$settings = $this->get_settings_for_display();
\MetForm\Utils\Util::metform_content_renderer(\MetForm\Utils\Util::render_form_content($settings['mf_form_id'], $this->get_id()));
}
}