Conditions on forms


I created a form and I also created a selectbox inside this form. When I select option A, I want to see one number field. However, when I select option B, I want to see two number fields. The selectbox and conditions are working perfectly outside the form. However, the conditions inside the form are not functioning. Any help is appreciated.