[TYPO3-english] Extbase: New -> Create looses value

Jan Bednarik info at bednarik.org
Sun Jan 4 13:38:48 CET 2015


depending on context I'm setting a type property to certain value. To do 
that I've got this in "new":

if ($newBlog === NULL) {
             $newBlog = 
         $newBlog->setType(2); // Výkaz

When the form: <f:form action="create"  enctype="multipart/form-data" 
name="newBlog" object="{newBlog}" arguments="{campaign : campaign}" 
class="form-horizontal form-wrapper margin-top margin-bottom">

is then submitted and I intercept the create action with custom 
validator, the "type" property is empty (0). I had to add <f:form.hidden 
property="type" value="{newBlog.type}"/> to fix it. However, this is not 
really secure as the value in hidden field can be changed.

So, am I doing sth wrong?


More information about the TYPO3-english mailing list