The container field itself can be set to slide up if the container field is empty. This will make the field disappear from your layout when it is empty.
But you have to specify top alignment for the container field before it will slide up. Unlike other fields, this top alignment is specified as a data format on the data formatting tab of the inspector instead of on the appearance tab as it is for all other fields.
Thank you. The part with aligning to the top is what I had wrong. Works great now.