My php code
function form($instance){
echo '<p style="text-align:right;"><label for="'.$this->get_field_id('title').'">' . esc_html__('Title:', 'banyansopno') . ' <input style="width: 200px;" id="'.$this->get_field_id('title').'" name="'.$this->get_field_name('title').'" type="text" value="'.$instance['title'].'" /></label></p>';
echo '<p style="text-align:right;"><label for="'.$this->get_field_id('posts').'">' . esc_html__('Number of Posts:', 'banyansopno') . ' <input style="width: 50px;" id="'.$this->get_field_id('posts').'" name="'.$this->get_field_name('posts').'" type="text" value="'.$instance['posts'].'" /></label></p>';
echo '<input type="hidden" id="custom_recent" name="custom_recent" value="1" />';
}
Below notice
NOTICE: G:\xampp\htdocs\banyan\wp-content\themes\banyan\inc\custom-widgets.php:65 - Undefined index: title
wp_list_widgets, call_user_func_array, wp_widget_control, call_user_func_array, WP_Widget->form_callback, banyansopno_show_popular->form
NOTICE: G:\xampp\htdocs\banyan\wp-content\themes\banyan\inc\custom-widgets.php:67 - Undefined index: posts
wp_list_widgets, call_user_func_array, wp_widget_control, call_user_func_array, WP_Widget->form_callback, banyansopno_show_popular->form
how to solve this probelm?