what is the best solution to insert a treeview control within a dialog Box Form

what is the best solution to insert a treeview control within a dialog Box Form

 Hi

I am a beginner in Javascipt and Jquery. So, my question may sounds very stupid.

I would need to develop a parent form that would pop up a resizeable dialog box child form wihen a button is clicked. The parent form should be able to pass parameters to the child form and likewise the subfrom should be able to return values to the parent one.
I would like also to insert within the child form a kind of treeview control that woud allow the user to browse and select mutiple elements which will be then return to the parent one when the child form submit button is clicked.

So, I was thinking to use jstree plugin ( https://www.jstree.com/ ) inside a Jquery-UI modal form ( https://jqueryui.com/dialog/#modal-form ). Please, is it the best technical solution to go for or do you have a better option to suggest ?

Thanks a lot for your help,

Regards,

Akli