I am focusing on a WordPress Widget and also the good examples all have huge HTML/PHP portions intermixed which is impossible to see, so within the interest of attempting to wash stuff up Let me move all the HTML rendering to some separate PHP file that'll be include()'d.

The secret for this is, the file I include does not have the symptoms of use of $this and I am unsure how you can fix that.

widget.php

class Preorder extends WP_Widget {
    ...
    function form() {
        include('form.php');
    }
}

form.php

<p>
   <?php echo $this->get_field_id('title'); ?>
</p>

Which leads to [31-Aug-2011 19:59:19] PHP Fatal error: Call to a member function get_field_id() on a non-object in ... so clearly $this does not arrive free of charge. I have attempted aliasing $this to a different variable &lifier even for entertainment while using global keyword with no success.

Hopefully I skipped something easy.

Didn't remember which i was iterating within the directory &lifier include-ing every .php file, re-named form.php to create.tmpl and seems to operate.

Durr.