set a singular field when update a specific field
set a singular field when update a specific field
erickmt
Posts: 15Questions: 3Answers: 1
I would like that when I update de field 'perfil' the other field 'until_date' was setted by one year from now date. Is that possible?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Absolutely - three options (in order of my personal preference):
preCreate
andpreEdit
would be the events to use here.dependent()
to set the value on the client-side and submit that new value.The reason I've put them in that order is that the db trigger will run regardless of client-side code (i.e. if you update the value in the db directly), while the last one is potentially hackable (would be easy to submit a different value).
Allan