Welcome Guest, Not a member yet? Register   Sign In
Troubles with FormGeneration and smarty
#1

[eluser]Unknown[/eluser]
Hello, guys!
I'm trying to use Frank Michel's Form Generation Library (HERE you can retrieve it) in conjunction with the template engine Smarty. Into my controller i declared my Form object as i've seen on the tutorial:

Code:
$myForm = $this->form
            ->open('edit_scheda')
            ->text('cognome')
            ->radiogroup('sesso', $radiogroup, 'Sesso:', 'required')
            ->textarea('descrizione')
            ->submit()
            ->reset()
            ->onsuccess('redirect','write_scheda');
            $edit = $this->form->get();
            $errs = $this->form->errors;
            $this->mysmarty->assign('form', $edit);
            $this->mysmarty->assign('errors', $errs);
            $this->mysmarty->assign('content', 'internal/form.tpl.php');
            $this->mysmarty->display('template.tpl');

And then, in my form.tpl.php:

Code:
<?print_r($form)?>

This outputs absolutely nothing from the "form.tpl.php" file, while the other parts of the template are correctly rendered!!

Any suggest to solve this problem?




Theme © iAndrew 2016 - Forum software by © MyBB