public function populate(ActiveForm $form) { foreach ($this->getPost($form->getName()) as $index => $value) { if (is_array($value)) { //Recursive Iteration } else { $form->{$index}->setValue($value); } } }
protected function buildHtmlElement() { parent::buildHtmlElement(); $this->addElement(new ActiveInput(), 'nome', 'Nome'); $this->addElement(new ActiveInput(), 'senha', 'Senha'); }