get info from user when using Button

get info from user when using Button

Hi
I'm trying to male an Send SMS button that open a dialog box and sends the message the user is writing.
what do i need to do?
tnx