[TYPO3-mvc] getting the arguments of the form?
Stig Nørgaard Færch
snf at dkm.dk
Mon Feb 20 14:21:11 CET 2012
Den 20-02-2012 14:13, Bastian Waidelich skrev:
> Stig Nørgaard Færch wrote:
>
> Hi Stig,
>
>> I could have input form with the name:
>> tx_myext_user_myextadmin[person][streetName]
>> [...]
>> But is possible to check directly on above input field?
>> [...]
>
> I'm sure there is a nice solution to what you're trying to achieve. So
> what *are* you trying to achieve? ;)
Yes! And I just found it! :-)
Actually I was just trying to detect if there was a change on a field.
So I wanted to get the value of that field.
First I thought that $person->getStreetName() would give me what was
currently saved in repository. But that actually gets me the request value.
Then I found I could get the original value with _getCleanProperty():
if($person->_getCleanProperty('streetName') != $person->getStreetName()) {
// The value has changed
}
Is this the way?
/Stig
More information about the TYPO3-project-typo3v4mvc
mailing list