[TYPO3-german] Viewhelper mit FormEngine

Andreas Frey webmaster at colloco.de
Tue Oct 21 09:59:28 CEST 2014


Hi

Ich versuche mich derzeit an meiner ersten Extbase BE Extension. Um das 
typische TYPO3-Handling nutzen zu können, will ich die Klasse FormEngine 
verwenden. Hierzu habe ich einen Viewhelper erstellt. Mir werden nun auch 
schon die Formulare generiert - die Inhalte der einzelnen Felder sind aber 
nicht sichtbar, da sie z.Z. in einem hiddenfield übergeben werden.

Ich gehe davon aus, dass etwas mit der Validierung der Werte noch nicht 
stimmt. Als JS-Fehler erhalte ich: "TypeError: document[TBE_EDITOR.formname] 
is undefined" aus der jsfunc.tbe_editor.js.

Könnte mir bitte jemand sagen was mir noch zur richtigen Verwendung der Klasse 
FormEngine fehlt? Unten findet ihr Teile meines Viewhelpers.

Vielen Dank.

#####

$this->pageRenderer->loadPrototype();
$this->pageRenderer->loadExtJS();

$this->tceforms = 
GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
$this->tceforms->initDefaultBEMode();

// EXTBASE FORMS
$this->tceforms->prependFormFieldNames = $this->getFieldNamePrefix();
$this->tceforms->formName = $table;
$this->tceforms->totalWrap = '<div class="typo3-TCEforms"> |  </div>';

$this->tceforms->doSaveFieldName = 'doSave';
$this->tceforms->localizationMode = GeneralUtility::inList('text,media',$this-
>localizationMode) ? $this->localizationMode : '';
$this->tceforms->returnUrl = $this->R_URI;
$this->tceforms->palettesCollapsed = !$this->MOD_SETTINGS['showPalettes'];
$this->tceforms->disableRTE = !$GLOBALS['BE_USER']->isRTE();
$this->tceforms->enableClickMenu = TRUE;
$this->tceforms->enableTabMenu = TRUE;

$panel = $this->tceforms->getMainFields($table,$data);

$body = $this->tceforms->printNeededJSFunctions_top();
$body.= $this->tceforms->wrapTotal($panel,$data,$table);
$body.= $this->tceforms->printNeededJSFunctions();

#####


More information about the TYPO3-german mailing list