How to make fields require or disabled