You could always set a default value for the string, and check if the string has been changed. If the string is still set to the default after running the code, refuse to continue until something is entered. So, for example, you would put this just somewhere in the passage, so that it runs as soon as the passage is loaded:
(set: $yourstring to "default")
Then, when the prompt is launched (such as by clicking a link, or however you're handling it):
(if: $yourstring is "default")[(set: $yourstring to (prompt: "Define the string:", "not default"))]
(if: $yourstring is "default")[Dude just type something in the box]
(else:)[Text continuing the story]
I'm pretty sure the rest of the code won't execute until after the prompt window is closed, so this should allow you to prompt the player to input something, check whether they did, and continue or refuse to continue depending on whether they entered something. If they refused, they can just click on the link to run the code again.