How do I render (get HTML of) a form object in Agile Toolkit?

I’m using PHP framework Agile Toolkit version 4.3.2 (latest at this moment). I’m on a page that extends the default Page class.

Suppose I have a form object like:

$form = $this->add('Form');
$form->addField('text', 'name', 'Name');
$form->addSubmit('Save');

How do I get the form object’s HTML? I want to send the form’s HTML to another template part, something like:

$this->template->trySetHTML('Content', $form);

The function from above works if I use HTML code instead of the $form object.

But in this case when I refresh the page, instead of the form HTML appears a string like: Object Form(22f8a7bc__ancedsearch_form)

I tried: $form->render() or $form->getHTML() but these functions don’t work.

So please tell me, how do I render an object in agile toolkit? How can I get the object’s HTML code.

Resolved here: http://stackoverflow.com/questions/40789451/how-do-i-render-get-html-of-a-form-object-in-agile-toolkit