This is more a question of best practice.
I am creating a page and a renderer (that extends plugin_renderer_base). I need to have a form on the page that will submit data back to the same page. My question is, should I can the form inside my render_ method and if so, where should I do all the logic such as $form->get_data() and $form->set_data()? It doesn't seem right to do it inside the renderer, but if I do it anywhere outside, I will have to call the form constructor again which also doesn't seem right.
Or, does anyone know of a good example in the Moodle source code.
Thanks,