Why the Trim Spaces setting on APEX items is important

Oracle APEX offers a declarative setting for Text and Textarea items to “Trim Spaces”, which would remove leading/trailing spaces from the user input before saving the value to the database.

A good example why this is important can be seen in the Page Designer itself. In a customer project we recently stumbled over that. If you accidentally enter a blank into the CSS File URL section…

…you end up with a ressource not found error in the network tab of developer tools and in some browsers even a error message in the console.

This happens, because APEX actually tries to request the “blank” file as a stylesheet.

So, better switch on that Trim Spaces setting, unless you really want to save those blanks.

Leave a Reply

Your email address will not be published. Required fields are marked *