When using Harlowe, I used the following:
(set: $name to (prompt: "Enter your name:", "Type your name here"))$name, you have been chosen
(set: $name to (prompt: "Enter your name:", "Type your name here"))
$name, you have been chosen
But how would I transfer this so that it works in sugarcube?
In sugarcube it would look something like this:
What is your name? <<textbox "$name" "Type your name here" autofocus>><<button "Enter">><<replace "#name">>$name, you have been chosen<</replace>><</button>> <span id="name"></span>