A
A
Alex Art2019-06-25 23:30:07
Angular
Alex Art, 2019-06-25 23:30:07

How to make a field optional in reactive forms if there is a certain checkbox?

Good day! There is a form with details of the organization. It must have a checkpoint field, but next to it you need to tick, they say, I am an individual entrepreneur, and the IP does not have a checkpoint. So - how to make the checkpoint field optional in reactive forms when choosing this checkbox?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Shvets, 2019-06-26
@WebmasterW3S

https://stackblitz.com/edit/angular-vnskip

0
0xD34F, 2017-08-26
@JackShcherbakov

addClass you do is great - but where is removeClass?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question