How to dynamically show fields in form according to number inputted?