[TYPO3-mvc] Widget: use of form viewHelpers?

Tim Schoch | GSTALTIG tim.schoch at gstaltig.ch
Tue Oct 11 17:17:12 CEST 2011


Hello List

I'm trying to create something like the new enableFields selectbox (begroups) with jQuery. 
I've allready created a widget and everything works fine, except for the checkbox' property.
The resulting HTML looks like this:

<input id="features3" type="checkbox" value="4" name="[__identity]">

The problem is, that the Form is not passed to the widget's view inside the viewHelperVariableContainer.
Normaly it would be fetched from there with $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName');

Now what?

I tried several things:
- fetching the Form in the Widget's ViewHelper and passing it somehow to the controller, to set it manually
  -> failed to pass the value to the controller, tried everything i could think of
- pass the objectName as default value of an argument
  -> does not work because the viewHelperVariableContainer is set after the arguments are initiallized
- hoping it would work by default
  -> haha

My last resort would be to write it into the session, but that feels... crappy! I guess there must be some way to pass values
from the viewHelper to the controller that I haven't found. Can someone help me out?

Thanks, Tim


More information about the TYPO3-project-typo3v4mvc mailing list