Hi people,
Reading https://forum.phalcon.io/discussion/191/setting-default-value-for-a-form-element I have a question: It's possible get the same result with two levels object?. For example:
Objects:
class Ob1 {
public $element;
}
class Ob2 {
public $name;
}
Forms:
class Form extends \Phalcon\Forms\Form
{
public function initialize()
{
$field = new Text("name");
}
}
Controller:
$obj = new Ob1();
$obj2 = new Ob2();
$obj2->name = "Hi";
$obj->element = $obj2;
$this->view->form = new Form($obj2);
View:
{{ form.render('name') }}
Thanks a lot