Extensions/WordPress/Widget/Widget.php
public function form( $instance ) 
    {
        // Reset the names so that the form's update function works properly
        foreach ( $this->config->fields as $field )
        {
            $field->name = $field->init_name;
        }
        // Update values
        $this->form->updater->set_new_instance( $instance );
        $this->form->updater->update();
        
        // Set the widget specific field names and ids
        foreach ( $this->config->fields as $field )
        {
            $field->id   = $this->get_field_id( $field->init_name );
            $field->name = $this->get_field_name( $field->init_name );
        }
        
        // Print the form
        $this->form->render(true);
    }
public function form( $instance ) 
    {
        // Reset the names so that the form's update function works properly
        foreach ( $this->config->fields as $field )
        {
            $field->name = $field->init_name;
        }
        // Update values
        $this->form->updater->set_new_instance( $instance );
        $this->form->updater->update();
        
        // Set the widget specific field names and ids
        foreach ( $this->config->fields as $field )
        {
            $field->id   = $this->get_field_id( $field->init_name );
            $field->name = $this->get_field_name( $field->init_name );
        }
        
        // Print the form
        $this->form->render(true);
    }
public function form ( $ instance ) { // Reset the names so that the form's update function works properly foreach ( $ this -> config -> fields as $ field ) { $ field -> name = $ field -> init_name ; } // Update values $ this -> form -> updater -> set_new_instance ( $ instance ) ; $ this -> form -> updater -> update ( ) ; // Set the widget specific field names and ids foreach ( $ this -> config -> fields as $ field ) { $ field -> id = $ this -> get_field_id ( $ field -> init_name ) ; $ field -> name = $ this -> get_field_name ( $ field -> init_name ) ; } // Print the form $ this -> form -> render ( true ) ; }
Generates the administration form for the widget

@param array $instance    The array of keys and
values for the widget
Generates the administration form for the widget