I learned how to produce a wordpress plugin using blogging platforms not long ago. However, WordPress transformed everything around and I am attempting to produce the same wordpress plugin while using new WordPress format. I have read a number of things, but attempted to leap in by modifying the WordPress Text Area wordpress plugin (among my goals with replacing the wordpress plugin was to really make it functional multiple occasions). I recognize the code is actually rough, but I am stuck. I have attempted to include two new fields simply to observe how things go even though they seem after i visit edit the widget when you click save money on the Title and first textarea data will get saved, another two fields dissapear.

I've got a feeling I am missing something apparent, however i cannot appear to decipher it. Here's the code:

        function WP_Widget_Excerpt() {
                $widget_ops = array('classname' => 'widget_text', 'description' => __('Text or HTML'));
                $control_ops = array('width' => 400, 'height' => 350);
                $this->WP_Widget('text', __('Multi Excerpt'), $widget_ops, $control_ops);
        }

        function widget( $args, $instance ) {
                extract($args);
                $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
                $text = apply_filters( 'widget_text', $instance['text'], $instance );
                $texta = apply_filters( 'widget_text', $instance['texta'], $instance );

		$posts = $instance['posts'];

                echo $before_widget;
                if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
                        <div class="textwidget"><?php echo $text; ?><?php echo "Posts: ".$posts; ?> <?php echo $texta; ?></div>
                <?php
                echo $after_widget;
        }

        function update( $new_instance, $old_instance ) {
                $instance = $old_instance;
                $instance['title'] = strip_tags($new_instance['title']);

		$instance['posts'] = $new_instance['posts'];

                $instance['text'] = stripslashes( wp_filter_post_kses( $new_instance['text'] ) );

                $instance['texta'] = stripslashes( wp_filter_post_kses( $new_instance['texta'] ) );

                return $instance;
        }

        function form( $instance ) {
                $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'posts' => '', 'texta' => '' ) );
                $title = strip_tags($instance['title']);
                $text = format_to_edit($instance['text']);
                $texta = format_to_edit($instance['texta']);
		$posts = $instance['posts'];
?>
                <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
                <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>

                <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>

                <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('texta'); ?>" name="<?php echo $this->get_field_name('texta'); ?>"><?php echo $texta; ?></textarea>
		<p><label for="<?php echo $this->get_field_id('posts'); ?>">Posts:</label>
		<input class="widefat" id="<?php echo $this->get_field_id('posts'); ?>" name="<?php echo $this->get_field_name('posts'); ?>" type="text" value="<?php echo $posts; ?>" /></p>
    <?php
            }
}   

// Register widget to WordPress
add_action('widgets_init', 'widget_excerpt_init');
function widget_excerpt_init() {
    register_widget('WP_Widget_Excerpt');
}

?>

Thanks ahead of time.

Edited: I discovered my original answer was somewhat correct. Here are the particulars must fix your condition.

Improve your WP_Widget_Excert function towards the following

function WP_Widget_Excerpt() {
        $widget_ops = array('classname' => 'WP_Widget_Excerpt', 'description' => __('Text or HTML'));
        $control_ops = array('width' => 400, 'height' => 350);
        $this->WP_Widget('WP_Widget_Excerpt', __('Multi Excerpt'), $widget_ops, $control_ops);
}

In case your Widget does something simple you should use Widgetifyr.com to produce your widget for you personally. I produces that old style widget along with the new 2.8+ class based widget. By doing this your widget will operate on more versions of Wordpress.