Dialog and passing value to parent

Dialog and passing value to parent

Hello.

I have a problem i`d like to

page <- on the page some form
on page i have input field e.g. <input id="test">

tree <- open in dialog from page (button)

select value from tree from <input checkbox>
submit (close modal)

fill the <input id="test"> with value from <input checkbox> from tree