trim explode for categoriesToShow and hidden fields