[TYPO3-mvc] HMAC check fails / form view helper

Claus Due claus at wildside.dk
Mon Sep 26 14:03:13 CEST 2011


Hi Till,

How does your model look? Is the "city" property defined properly in model and TCA as well?

"name" attribute is surely wrong in your case, but this should be resolved automatically given the correct attribute and a valid Domain Model + TCA setup for it.

>> Absolutely. HMAC safe too. I suggest using DHTML:
>> 
>> <f:form.hidden property="city" id="someid" />
>> <ul>
>> <f:for each="{cities}" as="city">
>>   <li><a data-value="{city.id}" href="javascript:;" onclick="jQuery('#someid').val(jQuery(this).attr('data-value');">{city.name}</a></li>
>> </f:for>
>> </ul>
>> 
>> ...but you may want to use another way of DHTML'ing the above. Possibly also add a check for the selected city and set a class for the relevant city link for highlighting.
>>   
> I already tried something similar (onClick="$('#input_city').val('{city.uid}');$('#search_form').submit();") but it didn't work neither.
> 
> For some reason the form.hidden view helper in your code doesn't accept the property assignment. I.e. the rendered HTML just looks like this:
> <input id="input_city" type="hidden" name="" value="" />

/Claus


More information about the TYPO3-project-typo3v4mvc mailing list