Sample form request

Hi,

I need to have a form on which I select a file, a button to validate and a textbox.
After selecting the file, I click validate and in the textbox I want to write “valid” if the text file contains the words “correct sample”, “invalid” otherwise.
I need to do this in UiPath.Forms.Activities version 22.10

I know how to put everything on the form, but not how to pass the info to the flow and back without exiting the form.

Thanks!