You can use conditional visibility to hide and show input boxes (and other widgets) on a page. You will get the best performance using a nanoflow when you click the button, since nanoflows execute client side. In the nanoflow, you can change attributes which control the visibility of the widgets you want to show or hide.
Conditional Visibility documentation can be found here: https://docs.mendix.com/studio/page-editor-widgets-visibility-section#1-introduction
conditional visibility will help you, on your snippet place all your max needed input and then on click make the desired input field visible …
you can control the visibility based on conditions or values,...