setFormType(FormConstants::CREATE); $this->setProvider(new RessourceDataProvider()); $this->initFields(); $this->loadDataToForm(); } public function initFields() { $email = new InputGroup('usernameGroup'); $email->addTextField('name', false, true); $email->addInputAddon('emailSign', false, '@'); $email->addInputComponent((new InputGroupElements\Text('domain'))->addHtmlAttribute('readonly','true')); $this->addSection($email); $this->generateDoubleSection([new Text('description'), new Select('type')]); $this->generateDoubleSection([new Select('manager'), new Select('status')]); } }