Need to capture user input from custom function

Need to capture user input from custom function

Hi, 
On click of a custom button, is there any way we can ask for user input. I am planning to capture coupon code when sales order is created and store in custom field.