How to work with dependent form fields