Manipulate sql database values before being submitted to the client
Manipulate sql database values before being submitted to the client
This question has an accepted answers - jump to answer
This discussion has been closed.
This question has an accepted answers - jump to answer
Answers
Sure, anything is possible:
- getFormatters with SQL (see example below)
- postGet event handlers with SQL: Just pass $data by reference ("&$data") and do whatever you like to manipulate it
Like this for example (just for illustration purposes)
Thanks for pointing me to the solution.
I did as you suggested but on 'preGet', which seems to work fine.
Just for illustration:
Sure, any event is ok for this. I use "validatedEdit" and "validatedCreate" a lot: At that point you know the UPDATE or INSERT done by Editor will be fine and you can make certain required updates beforehand, e.g. more complex link table inserts and the like.