[TYPO3-project-formidable] Changing data before saving
Radu Cocieru
radu at cocieru.com
Sun Dec 3 16:24:39 CET 2006
Hi Oliver
The DB datahandler has the tags
<process>
<beforeinsertion>
<extension>this</extension>
<method>Method</method>
....
have a look at the
ameos_formidable/api/class.maindatahandler.php
_processBeforeInsertion method
For more details.
Regrads
Oliver Klee wrote:
> Hi all,
>
> using formidable 0.5.0 plus the REG validator, I have a text renderlet
> which looks like this:
>
> <renderlet:TEXT name="price_regular">
> <label>LLL:EXT:seminars/locallang_db.php:tx_seminars_seminars.price_regular</label>
> <validators>
> <validator:PREG>
> <pattern>
> <value>/^[\d]*((\.|,)[\d]{1,2})?$/</value>
>
> <message>LLL:EXT:seminars/pi1/locallang.php:message_noPriceNumber</message>
> </pattern>
> </validator:PREG>
> </validators>
> </renderlet:TEXT>
>
> As decimals can only be saved using "." as the decimal point, I'd like
> to change all "," to "." before saving the data (e.g. using preg_replace).
>
> How can I change the value before saving it to DB?
>
> Thanks a lot in advance,
>
>
> Oliver
More information about the TYPO3-project-formidable
mailing list