How to auto-add fields whenever required