I am at a crossroads. The API returns me data in uppercase and lowercase, is there any way that the API returns me the data only in uppercase? It could be done from the Frontend, but the component I'm working on for some strange reason does not allow me to transform them to uppercase.
You could use a beforeChange hook to uppercase the field before saving if you wanted to prevent future misalignments. You would need to write a small script to update the existing ones (ez to do).
Or you could use a beforeRead hook that transforms the text before it’s returned.
I would likely go with option 1 bc the compute would only need to be done on write, and never on read.
I understand, would you be so kind to provide an example of option 1 please
Which part are you unsure of?
of how the beforeChange hook should be implemented
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.