PHP if/then in Directory

Is it possible to have the custom fields show up ONLY when information is entered? For example. I have a Facebook icon and want them to enter their facebook URL. Would like it if the icon only showed up when they entered something in the custom field.