We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

get all fields in a behavior

hi,

I need get all fields in a behavior, for aply a trim.

basically, I need to apply trim in the fields, and set to upper case in the text fields only, ie, not in date fields.

but, I need get all the fields to do this.

how do it?

sorry for my english...

When do you need to do this? After the model is retrieved? If yes, then look into the afterFetch event and method.

I need it before saving on the database, ie in the beforeSave method.

tanks

If that's the answer, please accept your response so this thread gets flagged as "solved"