How to create multiple fields to be shown only if required