Send value of input text when click on button

Please read this post for how to share code on the forum so that it is importable. You should go to a new line and click the </> button then paste the code where it says.