samedi 28 février 2015

symfony1 doctrine form submit - where to inject logic

I've got a simple form that includes an input that will take money, i.e. float. So far it can accept a well-formed decimal only, e.g. 12768.56. The task to inject some server-side logic (no javascript here) that would intercept the input value, like 12 768,56, replace it with 12768.56 and let symfony/doctrine do its work. The transformation is just an example and I'ev got what I need, but the question is - where should I put the intercepting function? I guess it should be somehwere in the XxxForm.class.php. But I don't know which method. doSave? processData? I'm pretty sure there is a special place for that...


Aucun commentaire:

Enregistrer un commentaire