My form includes fields such as md-select
and md-radio-button
. The radio button options are dependent on the selection made in the md-select field. To see an example, please check out this plunker.
I have set the sub-organism radio-button field to be required in the form. It works correctly upon initial loading. However, if a sub radio button option is selected and then the organism select box is changed, the form remains valid even without a valid sub-organism value. I need the form to become invalid if no sub radio button is checked. Any suggestions would be appreciated.
Question 2: In the plunk provided, there are lines commented out after line 47 in app.component.ts. Uncommenting these lines will set default values for the fields. This results in the sub-organism radio buttons being displayed while the select box remains blank. Although the reason for displaying the sub-organism fields is due to a selected value, it seems that the option is not being selected for organisms in the md-select field. Any insights into this issue?