public static function addExtraControls(FForm $theForm) { $theForm->addTextInput('samplefield', translateFN('Esempio'))->setRequired()->setValidator(FormValidator::NOT_EMPTY_STRING_VALIDATOR); // add an extra field if we're embedding the controls // in the standard edit_user form if (!isset($this)) { $theForm->addHidden('forceSaveExtra')->withData(true); } }