Automatically assign parent terms of selected child in proforms

Hey, I have an unusual request. I have a form which creates/edits post from CPT.

This CPT has its custom hierarchical taxonomy, which I need to edit via this form. So far so good, everything is working as expected.

The thing I cant figure out is how to automatically select parent terms when child term is selected.

So basically if I have:

Term parent
Term child 1.0
Term child 2.0

and I select Term child 2.0, I need to automatically select Term child 1.0 and Term parent.

Is this possible with proforms? Thanks a lot!!